Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with rake heroku:create_config command #28

Closed
3en opened this issue Jan 26, 2011 · 4 comments
Closed

Issue with rake heroku:create_config command #28

3en opened this issue Jan 26, 2011 · 4 comments
Labels

Comments

@3en
Copy link

3en commented Jan 26, 2011

I get the following error after installing the latest gem.

macbook-pro:cvmongo Ben$ sudo rake heroku:create_config --trace
(in /Users/Ben/Dropbox/Web/cvmongo)
** Invoke heroku:create_config (first_time)
** Execute heroku:create_config
Copied example config to config/heroku.yml
/Users/Ben/Dropbox/Web/cvmongo/config/heroku.yml
rake aborted!
Command failed with status (127): [ /Users/Ben/Dropbox/Web/cvmongo/config/her...]
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:995:in sh' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:incall'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1010:in sh' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1094:insh'
/Library/Ruby/Gems/1.8/gems/heroku_san-1.0.8/lib/heroku_san/tasks.rb:111
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in call' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexecute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in each' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:inexecute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in invoke_with_call_chain' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:insynchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in invoke_with_call_chain' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:ininvoke'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in invoke_task' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in each' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:intop_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in run' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/bin/rake:31 /usr/bin/rake:19:inload'
/usr/bin/rake:19
macbook-pro:cvmongo

@bryan-ash
Copy link
Contributor

Ben, is this trace getting mangled by markdown? I'm not seeing what the error is. We might have more luck if you paste it into a Gist and link it

@rahearn
Copy link
Contributor

rahearn commented Apr 6, 2011

This looks like a problem I just ran into. Had to do with an unset EDITOR environment variable. Everything ran smoothly when I ran EDITOR=vim rake heroku:create_config

@bryan-ash
Copy link
Contributor

@rahearn What is the error? I cannot see it amidst the noise in the original post.

@rahearn
Copy link
Contributor

rahearn commented Apr 10, 2011

On OSX it appears that the environment variable EDITOR is unset by default. That causes the last step of the heroku:create_config task sh("#{ENV['EDITOR']} #{HEROKU_CONFIG_FILE}") to fail because you're really just calling sh("#{HEROKU_CONFIG_FILE}")

My workaround ensures that EDITOR is set before calling rake, but a more defensive solution would probably check if EDITOR is set, launch if it is, or if not just print a message that the user should then edit config/heroku.yml by hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants