1

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/gems/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?

Winfield
  • 18,985
  • 3
  • 52
  • 65
99miles
  • 10,942
  • 18
  • 78
  • 123

2 Answers2

3

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.

dpiddy
  • 46
  • 2
  • Why would EY do this then? It seems like in every case that you put something in the development group only, the app would fail to launch (when in development mode on EY) b/c it won't install those gems that application.rb then tries to require? Also, I'm not able to reproduce this locally after running 'bundle install --without development test'. That seems odd. Thanks! – 99miles Aug 22 '11 at 02:44
  • Why would EY do what? I'm able to reproduce it locally: https://gist.github.com/1162178. It does seem to only break when `:require => 'ruby-debug19'` is present, though. That could be a bug in bundler. – dpiddy Aug 22 '11 at 11:28
0

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.

emachnic
  • 11
  • 1