This project is the old Ruby CLI for Heroku. This is the current CLI.
heroku / legacy-cli Goto Github PK
View Code? Open in Web Editor NEWHeroku CLI
Home Page: https://cli.heroku.com
License: MIT License
Heroku CLI
Home Page: https://cli.heroku.com
License: MIT License
This project is the old Ruby CLI for Heroku. This is the current CLI.
During heroku db:pull
, I get the following error on my Ruby 1.9 system:
Error encountered loading data, wrote the data chunk to dump.10718.gz | ETA: --:--:--
/usr/local/lib/ruby/gems/1.9.1/gems/taps-0.2.18/lib/taps/client_session.rb:232:in `load': class Date needs to have method `_load' (TypeError)
It does work fine with Ruby 1.8.6 so it's probably some compatibility issue.
I was getting this error during the 'Receiving data' part of the pull
/.rvm/gems/ruby-1.8.7-p302/gems/json-1.4.6/lib/json/pure/generator.rb:283:in `to_json': wrong argument type JSON::Pure::Generator::State (expected Data) (TypeError)
Reverting back to heroku-1.16.2 allowed db:pull to work properly.
json 1.1.0 is not 1.9 compatible. This sucks :(
It's also several versions old.
I just updated my gem heroku to 1.13.1 and when I run heroku command this is the output:
/usr/lib/ruby/gems/1.8/gems/heroku-1.13.1/lib/heroku/commands/pgbackups.rb:9: uninitialized constant Heroku::Command::Pgbackups::Help (NameError)
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in`require'
from /usr/lib/ruby/gems/1.8/gems/heroku-1.13.1/lib/heroku/command.rb:5
from /usr/lib/ruby/gems/1.8/gems/heroku-1.13.1/lib/heroku/command.rb:5:in `each'
from /usr/lib/ruby/gems/1.8/gems/heroku-1.13.1/lib/heroku/command.rb:5
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in`gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/lib/ruby/gems/1.8/gems/heroku-1.13.1/bin/heroku:7
from /usr/bin/heroku:19:in`load'
from /usr/bin/heroku:19
My environment:
RubyGems Environment:
Older versions works properly.
[ ~ ] >: heroku version
heroku-gem/1.11.0
[ ~ ] >: heroku logs
This feature is not supported by your client version.
It used to work but not any more now. Other command seems working except logs. Any idea?
Hello!
I've found a bug when using heroku with rails3 and windows. It doesn't deploy when sqlite3 is used locally. Here are the steps to reproduce:
C:\Users\jarmo\Desktop\minu\projects\Ruby>ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
C:\Users\jarmo\Desktop\minu\projects\Ruby>rails new my_app
create
create README
create Rakefile
...
C:\Users\jarmo\Desktop\minu\projects\Ruby>cd my_app
C:\Users\jarmo\Desktop\minu\projects\Ruby\my_app>cat Gemfile
source 'http://rubygems.org'
gem 'rails', '3.0.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3-ruby', :require => 'sqlite3'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
C:\Users\jarmo\Desktop\minu\projects\Ruby\my_app>bundle install
Fetching source index for http://rubygems.org/
...
Using bundler (1.0.0)
...
Using rails (3.0.0)
...
C:\Users\jarmo\Desktop\minu\projects\Ruby\my_app>git init
Initialized empty Git repository in C:/Users/jarmo/Desktop/minu/projects/Ruby/my_app/.git/
C:\Users\jarmo\Desktop\minu\projects\Ruby\my_app>git add .
C:\Users\jarmo\Desktop\minu\projects\Ruby\my_app>git commit -a -m "initial"
[master (root-commit) fc86647] initial
40 files changed, 10284 insertions(+), 0 deletions(-)
create mode 100644 .gitignore
create mode 100644 Gemfile
...
C:\Users\jarmo\Desktop\minu\projects\Ruby\my_app>heroku create my-testing-app
Enter your Heroku credentials.
...
C:\Users\jarmo\Desktop\minu\projects\Ruby\my_app>git push heroku master
Counting objects: 63, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (48/48), done.
Writing objects: 100% (63/63), 86.06 KiB | 117 KiB/s, done.
Total 63 (delta 2), reused 0 (delta 0)
-----> Heroku receiving push
-----> Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Gemfile detected, running Bundler version 1.0.0
Unresolved dependencies detected; Installing...
Fetching source index for http://rubygems.org/
Installing rake (0.8.7)
Installing abstract (1.0.0)
Installing activesupport (3.0.0)
Installing builder (2.1.2)
Installing i18n (0.4.1)
Installing activemodel (3.0.0)
Installing erubis (2.6.6)
Installing rack (1.2.1)
Installing rack-mount (0.6.13)
Installing rack-test (0.5.6)
Installing tzinfo (0.3.23)
Installing actionpack (3.0.0)
Installing mime-types (1.16)
Installing polyglot (0.3.1)
Installing treetop (1.4.8)
Installing mail (2.2.6.1)
Installing actionmailer (3.0.0)
Installing arel (1.0.1)
Installing activerecord (3.0.0)
Installing activeresource (3.0.0)
Using bundler (1.0.0)
Installing thor (0.14.2)
Installing railties (3.0.0)
Installing rails (3.0.0)
?[32mYour bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.?[0m
?[32m
Your bundle was installed to `.bundle/gems`?[0m
Compiled slug size is 3.5MB
-----> Launching.... done
http://my-testing-app.heroku.com deployed to Heroku
To [email protected]:my-testing-app.git
* [new branch] master -> master
C:\Users\jarmo\Desktop\minu\projects\Ruby\my_app>heroku logs > logs
C:\Users\jarmo\Desktop\minu\projects\Ruby\my_app>cat logs
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require': no such file to load -- sqlite3 (LoadError)
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `require'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `require'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler.rb:112:in `require'
from /disk1/home/slugs/305778_fc86647_2b7e/mnt/config/application.rb:7
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /disk1/home/slugs/305778_fc86647_2b7e/mnt/config/environment.rb:2
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from config.ru:3
from /home/heroku_rack/heroku.ru:23
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:63:in `new'
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:63:in `map'
from /home/heroku_rack/heroku.ru:18
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:11:in `new'
from /home/heroku_rack/heroku.ru:11
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:1:in `new'
from /home/heroku_rack/heroku.ru:1
==> dyno-2420546.log (crash) <==
/usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require': no such file to load -- sqlite3 (LoadError)
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `require'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `require'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.0/lib/bundler.rb:112:in `require'
from /disk1/home/slugs/305778_fc86647_2b7e/mnt/config/application.rb:7
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /disk1/home/slugs/305778_fc86647_2b7e/mnt/config/environment.rb:2
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from config.ru:3
from /home/heroku_rack/heroku.ru:23
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:63:in `new'
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:63:in `map'
from /home/heroku_rack/heroku.ru:18
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:11:in `new'
from /home/heroku_rack/heroku.ru:11
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/305778_fc86647_2b7e/mnt/.bundle/gems/ruby/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:1:in `new'
from /home/heroku_rack/heroku.ru:1
-----> Your application is requiring a file that it can't find.
Most often this is due to missing gems, or it could be that you failed
to commit the file to your repo. See http://docs.heroku.com/gems for
more information on managing gems.
Examine the backtrace above this message to debug.
When i do bundle install
on linux, then Gemfile.lock gets changed and after pushing to heroku, everything works. It seems that for the very first time, without having any other heroku applications and using Windows, it fails.
From heroku support ticket 9735 I was asked to open here doing that. I have stumbled upon new gems like rest-graph that declare to need >=rest-client-1.5.0 that I would like to use in my application with the heroku gem. Currently the dependencies conflict so it's not possible. Please look into adding support for >=rest-client-1.5.0.
Trying to do a db:pull to a default install of mysql was throwing: 'MySQL server has gone away (Mysql::Error)' which was incorrect. I added some debug to Sequel and the actual error being thrown is: "Got a packet bigger than 'max_allowed_packet' bytes"
If the correct error message is thrown this exception is a lot easier to fix (set max_allowed_packet variable in mysql to greater then 1meg).
When using heroku inside a rails app it pulls in json_pure. json_pure has an outstanding that changes the output of the .to_json method. See the output for script/console in this gist:
This is the open issue at json: http://github.com/flori/json/issues#issue/31
The issue can be produced by requiring both json and json/pure
I'm getting the following warnings when I add logging to my app. I've updated the gem, uninstalled the plugin and addon and re-installed them. Still get the same errors:
joe:~/projects/iq/qm$ gem update heroku
Updating installed gems
Nothing to update
joe:~/projects/iq/qm$ heroku plugins:install
http://github.com/heroku/heroku-logging.git
Unpacking objects: 100% (86/86), done.
heroku-logging installed
joe:~/projects/iq/qm$ heroku addons:add logging
Adding logging to questionmoms... [warning] The Response is no more a String
and the Response content is now accessed through Response.body, please
update your code
[warning] The Response is no more a String and the Response content is now
accessed through Response.body, please update your code
[warning] The Response is no more a String and the Response content is now
accessed through Response.body, please update your code
done (free)
joe:~/projects/iq/qm$
Here are my versions:
joe:~/projects/iq/qm$ heroku version
heroku-gem/1.14.10
joe:~/projects/iq/qm$ rails -v
Rails 3.0.1
joe:~/projects/iq/qm$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
joe:~/projects/iq/qm$
I know it's on my computer, but still... please don't leave my passwords anywhere in plaintext.
Would be nice to be able to get the fields of "heroku info" individually.
For example:
$ heroku info name
myapp
$ heroku info web_url
http://myapp.heroku.com/
When using the heroku gem 1.18.0, every heroku command through an error that it is looking for msvcrt-ruby191.dll. Probably has nothing to do with the heroku but may be one of the dependencies is looking for a later ruby version. I was using ruby 1.8.7. Reverting back to heroku 1.16.0 fixed this problem
When writing plugins, it's hard to place your command in the correct spot in the help display without doing a copy / paste job which would not be adaptable. The system needs to be more modular to accommodate adding in new commands.
The console output of `heroku stack migrate suggests at the end:
-----> Migration prepared.
Run 'git push heroku master' to execute migration.
Even when the heroku remote does not point to the app being migrated. If the user blindly follows this suggestion then they may get a git push error or inadvertently re-deploy the wrong app.
I created a rake task to generate the .gems file from gems listed in environment.rb. I thought this code (http://gist.github.com/433530) might be useful to include in the heroku gem.
This is a developer tool, it should not be rescuing all exceptions. It makes debugging issues with the gem hard. Here's an example: http://github.com/heroku/heroku/blob/master/lib/heroku/commands/db.rb#L64-66
When running "heroku create" to setup a new application I was greeted with the following:
% heroku create foo ! Internal server error
After investigating, I noticed that my ~/.heroku/credentials file was empty, which seems to have been triggering the problem. Correcting the file solved the problem.
The two methods are doing basically the same thing.
Only difference is a line break - during addons install we must have a line break or it will break the format
Display on dynos/workers commands is wrong when you set the value, but correct when retrieving it:
$ heroku dynos 2
catapult now running on 200 dynos
$ heroku dynos
catapult is running on 2 dynos
I think this might be fixed by an upgrade to a more recent RestClient, the to_i is returning the http status code (200) instead of the value of the string response.
Both Heroku and Taps have their json_depency set as ~> 1.2.4. The current version of json/json_pure 1.4.0
No other gems have the older version requirement and several gems are pushing me to version 1.4.0
As a result, I get the expected errors about not being able to load json_pure 1.2.4 for heroku or taps, because version 1.4.0 has already loaded.
Please advise. Thank you.
-A.
the latest (dec. 8) cucumber version depends on json ~>1.4.6
the latest (feb 25/yesterday) heroku version depends on json ~>1.5.1
I made some changes to play nice w/ non-rubygem pkg managers (rpg).
http://github.com/josh/heroku/compare/4a99abd69ffbcdf9a124f61052ce3364336c74d8...master
These changes should not affect any rubygems users. When you call any bin script, "heroku", rubygems will activate all the gemspec dependencies before hand. So all runtime "gem 'foo'" activations can safely be removed.
Though its not critical, I'd recommend against adding "lib/heroku" to the load path.
did a heroku db:pull .. all good.. then upgraded to the latest heroku gem and taps gem.. did a db:pull and got a bunch of errors..
i.e.
/Ruby/lib/ruby/gems/1.8/gems/sequel-3.10.0/lib/sequel/adapters/postgres.rb:163:in `async_exec': PGError: ERROR: duplicate key v
alue violates unique constraint "cities_pkey" (Sequel::DatabaseError)
went into pgadmin and deleted all the tables and did a heroku db:pull and all was well..
ran heroku db:pull again and got the same errors since the tables already existed.
i went from 1.8.0 to 1.9.1
$ gem list|grep heroku
heroku (1.9.1, 1.8.0)
and for taps.. 0.2.25 to 0.3.2
$ gem list|grep taps
taps (0.3.2, 0.2.25)
I posted this issue on taps github as well since I am not sure the exact source of the issue and the gems are dependent so I cannot downgrade just taps and try..
The regression caused here should have triggered a failure in the heroku gem's tests:
Currently the heroku app assumes that you only access heroku via one account. At Mocra we each have 1 developer/personal account, and a [email protected] account which centralises any billing, and is the "owner" of the mocra.com domain. So new apps need to be owned by [email protected] in order to have subdomains of mocra.com.
Unfortunately once the app is transferred to [email protected] we can no longer do several commands from the command line app; and we need to login/out of two accounts on the website.
Are there any forks of the gem, or anyone started work, on the heroku CLI supporting --user flags to pick a different user for an action?
Heroku fails to run commands under Windows:
C:\Users\jarmo\Desktop\minu\projects\Ruby\sample_app>ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
C:\Users\jarmo\Desktop\minu\projects\Ruby\sample_app>gem list | grep heroku
heroku (1.13.3)
C:\Users\jarmo\Desktop\minu\projects\Ruby\sample_app>heroku
C:/bin/pik/Ruby-187-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- pty (LoadError)
from C:/bin/pik/Ruby-187-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/bin/pik/Ruby-187-p302/lib/ruby/gems/1.8/gems/heroku-1.13.3/lib/heroku/commands/pgbackups.rb:1
from C:/bin/pik/Ruby-187-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from C:/bin/pik/Ruby-187-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/bin/pik/Ruby-187-p302/lib/ruby/gems/1.8/gems/heroku-1.13.3/lib/heroku/command.rb:5
from C:/bin/pik/Ruby-187-p302/lib/ruby/gems/1.8/gems/heroku-1.13.3/lib/heroku/command.rb:5:in `each'
from C:/bin/pik/Ruby-187-p302/lib/ruby/gems/1.8/gems/heroku-1.13.3/lib/heroku/command.rb:5
from C:/bin/pik/Ruby-187-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from C:/bin/pik/Ruby-187-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from C:/bin/pik/Ruby-187-p302/lib/ruby/gems/1.8/gems/heroku-1.13.3/bin/heroku:7
from C:/bin/pik/Ruby-187-p302/bin/heroku:19:in `load'
from C:/bin/pik/Ruby-187-p302/bin/heroku:19
The problem appeared starting from version 1.13.1. It's working fine with 1.12.2 and older.
This isn't very pretty:
valkyrie:~/adder(master)$ heroku destroy --confirm adder
Destroying http://adder.heroku.com/
Destroying http://adder.heroku.com/... donevalkyrie:~/adder(master)$
Missing a newline, and what's with the double-printing of the Destroying message?
I'd like to be able to use -r for --remote, -a for --app, -l for --long, etc.
Hi, in 1.6.0
If I run:
heroku info --app
I get this:
/usr/lib/ruby/gems/1.8/gems/heroku-1.6.0/bin/../lib/heroku/client.rb:45:in info': private method
gsub' called for true:TrueClass (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/heroku-1.6.0/bin/../lib/heroku/commands/app.rb:56:in info' from /usr/lib/ruby/gems/1.8/gems/heroku-1.6.0/bin/../lib/heroku/command.rb:45:in
send'
from /usr/lib/ruby/gems/1.8/gems/heroku-1.6.0/bin/../lib/heroku/command.rb:45:in run_internal' from /usr/lib/ruby/gems/1.8/gems/heroku-1.6.0/bin/../lib/heroku/command.rb:17:in
run'
from /usr/lib/ruby/gems/1.8/gems/heroku-1.6.0/bin/heroku:14
from /usr/bin/heroku:19:in `load'
from /usr/bin/heroku:19
I think it should extract the app name from the directory (a la extract_app in commands/base.rb) but extract_app returns True the first time around.
The readme says "If you're on a Mac, these are saved to your Keychain." - is this true? I thought someone wrote a plugin for this, but I don't think it's in the main client. Probably just remove the line.
The "General Info" and "Plugins" section display twice when running "heroku help", making the output much longer than it needs to be:
Since postgres requires, by default, the database to be the current system's user, it means that the config/database.yml needs a different database user for every developer working on your project. With Rails you can easily solve that by having the following configuration yaml:
development: &development
adapter: postgresql
host: localhost
port: 5432
username: <%= `whoami`.strip %>
password: ""
database: project_development
This works with Rails, because it is being fed to Erb before it is being fed to yaml, with Taps it doesn't. I propose to add this behaviour to the heroku client as well, so it will work transparantly.
Any +1's?
Thanks,
Jeroen
heroku --app=foo doesn't work, as the equals sign breaks things. This flies in the face of tons of *nix tradition, and often confuses me.
When I try to run latest heroku gem on Windows 7 x64 and Ruby 1.9.2 (136) the following exception is thrown:
[BUG] cross-thread violation on rb_gc()
(null)
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
$ heroku stack
/usr/local/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/json_pure-1.2.2/lib/json/common.rb:128:in initialize': can't convert RestClient::Response into String (TypeError) from /usr/local/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/json_pure-1.2.2/lib/json/common.rb:128:in
new'
from /usr/local/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/json_pure-1.2.2/lib/json/common.rb:128:in parse' from /usr/local/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/heroku-1.8.2/lib/heroku/client.rb:165:in
list_stacks'
from /usr/local/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/heroku-1.8.2/lib/heroku/commands/stack.rb:4:in list' from /usr/local/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/heroku-1.8.2/lib/heroku/command.rb:45:in
run_internal'
from /usr/local/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/heroku-1.8.2/lib/heroku/command.rb:17:in run' from /usr/local/Cellar/ruby/1.9.1-p378/lib/ruby/gems/1.9.1/gems/heroku-1.8.2/bin/heroku:14:in
<top (required)>'
from /usr/local/Cellar/ruby/1.9.1-p378/bin/heroku:19:in load' from /usr/local/Cellar/ruby/1.9.1-p378/bin/heroku:19:in
Trying to push a clone of git://github.com/Sophrinix/TryRuby.git
...
Installing hpricot (0.8.3) with native extensions
Installing ruby_core_source (0.1.4)
Installing linecache19 (0.5.11) with native extensions /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/ruby1.8.7/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/ruby1.8.7/bin/ruby
extconf.rb:2:in `require': no such file to load -- ruby_core_source (LoadError)
from extconf.rb:2
Gem files will remain installed in /disk1/tmp/build_18320_23994417905540/.bundle/gems/ruby/1.8/gems/linecache19-0.5.11 for inspection.
Results logged to /disk1/tmp/build_18320_23994417905540/.bundle/gems/ruby/1.8/gems/linecache19-0.5.11/ext/trace_nums/gem_make.out
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `each'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `build_extensions'
for those that manage a large number of apps, and adding a cron job to each and setting up the cron job is a pain. i'd love to do backups from a central location without having to create a new heroku account and adding it to every application i'm managing.
i can't seem to find a way to anything more than basic administration using the heroku gem though. i'd love to be able to do:
url = Heroku::Client.new(USER, PASS).create_backup(APP_NAME)
File.new("/tmp/#{APP_NAME}.dump", "w").write RestClient.get("#{url}")
it seems like for anything beyond basic app info, the heroku gem is useless. is this the case or am i missing something?
I get this error whenever I try DB push/pull:
$ sudo heroku db:push
Password:
Taps 0.3 Load Error: no such file to load -- taps/operation
You may need to install or update the taps gem to use db commands.
On most systems this will be:
sudo gem install taps
I already have the latest releases of the heroku
(1.17.10) and taps
(0.3.15) gems installed.
user@host$ heroku rake fail && echo THIS SHOULD NOT BE PRINTED
rake aborted!
Don't know how to build task 'fail'
(See full trace by running task with --trace)
(in /disk1/home/slugs/205683_04f506d_5914/mnt)
THIS SHOULD NOT BE PRINTED
It seems like reading the gitconfig file fails under 1.9.2 when it contains non-ascii chars (in our case, we have the git user name set to a name which contains the swedish character ΓΆ
). This is the error:
/Users/dev/.rvm/gems/ruby-1.9.2-p0@serenity/gems/heroku-1.17.2/lib/heroku/commands/base.rb:64:in `split': invalid byte sequence in US-ASCII (ArgumentError)
from /Users/dev/.rvm/gems/ruby-1.9.2-p0@serenity/gems/heroku-1.17.2/lib/heroku/commands/base.rb:64:in `git_remotes'
from /Users/dev/.rvm/gems/ruby-1.9.2-p0@serenity/gems/heroku-1.17.2/lib/heroku/commands/base.rb:33:in `extract_app_in_dir'
from /Users/dev/.rvm/gems/ruby-1.9.2-p0@serenity/gems/heroku-1.17.2/lib/heroku/commands/base.rb:25:in `extract_app'
from /Users/dev/.rvm/gems/ruby-1.9.2-p0@serenity/gems/heroku-1.17.2/lib/heroku/commands/base.rb:114:in `initialize'
from /Users/dev/.rvm/gems/ruby-1.9.2-p0@serenity/gems/heroku-1.17.2/lib/heroku/command.rb:46:in `new'
from /Users/dev/.rvm/gems/ruby-1.9.2-p0@serenity/gems/heroku-1.17.2/lib/heroku/command.rb:46:in `run_internal'
from /Users/dev/.rvm/gems/ruby-1.9.2-p0@serenity/gems/heroku-1.17.2/lib/heroku/command.rb:20:in `run'
from /Users/dev/.rvm/gems/ruby-1.9.2-p0@serenity/gems/heroku-1.17.2/bin/heroku:13:in `<top (required)>'
from /Users/dev/.rvm/gems/ruby-1.9.2-p0@serenity/bin/heroku:19:in `load'
from /Users/dev/.rvm/gems/ruby-1.9.2-p0@serenity/bin/heroku:19:in `<main>'
Similar to Issue 6 the latest Heroku 1.6.0 gem fails to install on my Vista Home Premium SP2 box with the following error. Heroku 1.5.2 with json 1.2.0 and json_pure 1.2.0 appear to continue to work fine.
C:\Users\Jon\Documents>ruby --version
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]
C:\Users\Jon\Documents>gem --version
1.3.5
C:\Users\Jon\Documents>gem update
Updating installed gems
Updating heroku
Building native extensions. This could take a while...
ERROR: Error installing heroku:
ERROR: Failed to build gem native extension.
C:/ruby19/bin/ruby.exe extconf.rb
creating Makefile
make
gcc -Wall -I. -IC:/ruby19/include/ruby-1.9.1/i386-mingw32 -I/C/ruby19/include/ruby-1.9.1/ruby/backward -I/C/ruby19/include/ruby-1.9.1 -I. -O2 -g -Wall -Wno-parentheses -o parser.o -c parser.c
parser.rl:4:16: re.h: No such file or directory
In file included from parser.rl:5:
c:/ruby19/include/ruby-1.9.1/ruby/backward/st.h:2:2: warning: #warning use "ruby/st.h" instead of bare "st.h"
parser.rl: In function cParser_initialize': parser.rl:460: error: structure has no member named
tbl'
make: *** [parser.o] Error 1
Gem files will remain installed in C:/ruby19/lib/ruby/gems/1.9.1/gems/json-1.1.0 for inspection.
Results logged to C:/ruby19/lib/ruby/gems/1.9.1/gems/json-1.1.0/ext/json/ext/parser/gem_make.out
Gems updated: rest-client, launchy
The "Example" section at the end of heroku help
is out of date; under Rails 3 it should be rails new myapp
.
However, it seems like maybe we don't need this section at all anymore. The quickstart guide has the information in more detail; heroku help
is for reference. I'd recommend cutting it completely.
Hi,
this commit: 849194b prevent us from pulling db to a sqlite database like this: sqlite:///Users/backup/Documents/Backups/postgres/backup-20101120002811.db since you fetch the host.(?)
Indeed, URI.parse('sqlite:///Users/backup/Documents/Backups/postgres/backup-20101120002811.db') return nil, so the "Invalid database url" error is raised.
The problem is, with this commit, our backups were not saved anymore, pretty bad... So for the moment we are using the 1.13.6 version. You should fix this quickly, I believe we are not the only one having this critical issue.
Thanks!
this raises "TypeError: can't convert Fixnum into String" here: http://github.com/heroku/heroku/blob/master/lib/heroku/commands/db.rb#L93
I'll submit a patch soon with a fix.
Just an idea on cosmetics:
$ heroku create
Creating freezing-mist-506.... done
Created http://freezing-mist-506.heroku.com/ | [email protected]:freezing-mist-506.git
Git remote heroku added
The repetition of Creating/Created looks a little funny. How about removing "Created":
$ heroku create
Creating freezing-mist-506.... done
http://freezing-mist-506.heroku.com/ | [email protected]:freezing-mist-506.git
Git remote heroku added
Has the added benefit of making that line shorter.
From a customer:
There seems to be a bug in the heroku gem, or somewhere in your service. When I attempt to add an ssh-rsa key which is prefixed with from="host.com" ssh-rsa ... by using heroku keys:add, I get an error saying " ! Contents Invalid public key / Fingerprint can't be blank" until I remove the from="" option in the public key.
Although I've actually been meaning to remove the from="" from my SSH key for some time now, I shouldn't have to change my SSH key to workaround a limitation imposed by heroku.
After installing the heroku gem, running any rake task results in multiple warnings about already initialized json constants. These warnings can be avoided by changing line 6 of lib/heroku/client.rb from require 'json/pure' unless {}.respond_to?(:to_json)
to just require 'json'
The base json library attempts to load the native extensions, but falls back on json/pure if it is not available. By loading through the main library, json is only loaded once in a standard Rails application.
Need an easy way to update existing plugins.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.