문제

I've tried to set up Errbit (Airbrake) for my RoR application with Heroku, following the below sites:

Deployment on Heroku worked perfectly. I can log in and create application normally, all settings seem to be OK.

In application side, I have created files as described in the guide :

*Gemfile:*
gem 'airbrake'

*config/initializers/errbit.rb:*    
Airbrake.configure do |config|
  config.api_key = 'eb81f59f77778865464da97f0e1ce5951'
  config.host    = 'myproject-errbit.herokuapp.com'
  config.port    = 80
  config.secure  = config.port == 443
end

I run "bundle install" and tried in localhost the command:

rake airbrake:test

OK, it works (information present in the heroku application). Next, I deploy in the production environment (via capistrano), and try again with :

 ssh app@xx.xxx.xxx.xxx
 cd /u/myapp/path/current/
 rake airbrake:test

I've got this error message:

/home/app/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find i18n-0.6.5 in any of the sources (Bundler::GemNotFound)
        from /home/app/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `map!'
        from /home/app/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `materialize'
        from /home/app/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
        from /home/app/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/definition.rb:159:in `specs_for'
        from /home/app/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/definition.rb:148:in `requested_specs'
        from /home/app/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/environment.rb:18:in `requested_specs'
        from /home/app/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler/runtime.rb:13:in `setup'
        from /home/app/.rvm/gems/ruby-2.0.0-p0/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
        from /home/app/.rvm/gems/ruby-2.0.0-p0@global/gems/rubygems-bundler-1.3.4/lib/rubygems-bundler/noexec.rb:74:in `setup'
        from /home/app/.rvm/gems/ruby-2.0.0-p0@global/gems/rubygems-bundler-1.3.4/lib/rubygems-bundler/noexec.rb:103:in `check'
        from /home/app/.rvm/gems/ruby-2.0.0-p0@global/gems/rubygems-bundler-1.3.4/lib/rubygems-bundler/noexec.rb:109:in `<top (required)>'
        from /home/app/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
        from /home/app/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
        from /home/app/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
        from /home/app/.rvm/gems/ruby-2.0.0-p0@global/gems/rubygems-bundler-1.3.4/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
        from /home/app/.rvm/gems/ruby-2.0.0-p0@global/gems/executable-hooks-1.2.3/lib/executable-hooks/hooks.rb:50:in `call'
        from /home/app/.rvm/gems/ruby-2.0.0-p0@global/gems/executable-hooks-1.2.3/lib/executable-hooks/hooks.rb:50:in `block in run'
        from /home/app/.rvm/gems/ruby-2.0.0-p0@global/gems/executable-hooks-1.2.3/lib/executable-hooks/hooks.rb:49:in `each'
        from /home/app/.rvm/gems/ruby-2.0.0-p0@global/gems/executable-hooks-1.2.3/lib/executable-hooks/hooks.rb:49:in `run'
        from /home/app/.rvm/gems/ruby-2.0.0-p0/bin/ruby_executable_hooks:10:in `<main>'

(I've entered the command with the "app" user (deployment user).)

It strikes me that ruby setting are wrong:

ruby version
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]

rvm list
rvm rubies

=* ruby-2.0.0-p0 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

So as you can imagine, when error occurs, data are not saved in the Errbit(Heroku) project.

I would appreciate if someone could help me ~

Thank you for reading.

도움이 되었습니까?

해결책

It's because you need launch the rake in your bundler env. Try :

bundle exec rake airbrake:test

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top