开发者

Deploy error on AppCloud with ruby-debug19 in text, development environments

开发者 https://www.devze.com 2023-03-30 04:17 出处:网络
In EY AppCloud, even when you run in development env, they run bundler --without development and test. My Gemfile contains this

In EY AppCloud, even when you run in development env, they run bundler --without development and test. My Gemfile contains this

group :test, :development do
  gem 'ruby-debug19', :require => 'ruby-debug'
end

and when I deploy I get this error:

Successfully installed engineyard-serverside-1.4.2
1 gem installed
~> Deploying revision a01f92c migrating to new FactoryGirl
~> Pushing code to all servers
~> Starting full deploy
~> Copying to /data/eg/releases/20110821184344
~> Ensuring proper ownership
~> Gemfile detected, bundling gems
~> Symlinking configs
ln: creating symbolic link `/data/eg/releases/20110821184344/config/database.yml': File exists
~> Migrating: cd /data/eg/releases/20110821184344 && PATH=/data/eg/releases/20110821184344/ey_bundler_binstubs:$PATH RAILS_ENV=development RACK_ENV=development MERB_ENV=development rake db:migrate --trace
rake aborted!
no such file to load -- ruby-debug
/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `each'
/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `block in require'
/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `each'
/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `require'
/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler.rb:120:in `require'
/data/eg/releases/20110821184344/config/application.rb:7:in `<top (required)>'
/data/eg/releases/20110821184344/Rakefile:5:in `require'
/data/eg/releases/20110821184344/Rakefile:5:in `<top (required)>'
/data/eg/shared/bundled_gems/ruby/1.9.1/g开发者_StackOverflow社区ems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/data/eg/shared/bundled_gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/data/eg/shared/bundled_gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/data/eg/shared/bundled_gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile'
/data/eg/shared/bundled_gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/data/eg/shared/bundled_gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/data/eg/shared/bundled_gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run'
/data/eg/shared/bundled_gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/data/eg/shared/bundled_gems/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/data/eg/shared/bundled_gems/ruby/1.9.1/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/data/eg/releases/20110821184344/ey_bundler_binstubs/rake:16:in `load'
/data/eg/releases/20110821184344/ey_bundler_binstubs/rake:16:in `<main>'
~> [Attention] Maintenance page still up, consider the following before removing:
 * any deploy hooks ran, be careful if they were destructive
 * any migrations ran, be careful if they were destructive
 * your old code is still symlinked as current
Failed deployment recorded in AppCloud
Deploy failed

If I comment out the gem 'ruby-debug19' line in Gemfile it works. But it should be ignoring that anyway since as mentioned, AppCloud ignores test, development env gems. It works locally in both cases. Can anyone think at all what might cause this?


I believe this is because config/application.rb calls Bundler.require with a few group names, one being Rails.env. You RAILS_ENV on the command line is development, which means Bundler.require is trying to load the development group and require things in it, including ruby-debug. Since the bundle has been installed the development group, it breaks.

Probably best to use development for RAILS_ENV when running your app locally and either staging or production for your app on AppCloud.


AppCloud does not install the 'development' or 'test' groups by default. You would need to configure that in an eydeploy.rb file. You can find documentation about Installation Groups at http://docs.engineyard.com/bundler-tips-for-appcloud.html.

0

精彩评论

暂无评论...
验证码 换一张
取 消