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

Rake - There was an error while trying to load the gem 'paranoia' #328

Closed
joaomarceloods opened this issue Jun 8, 2016 · 2 comments
Closed

Comments

@joaomarceloods
Copy link

joaomarceloods commented Jun 8, 2016

I get the error listed below when trying to run any rake task. Maybe this isn't related to paranoia directly, but I hope someone has already gone through this and can show me a way out.

rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'paranoia'.
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
/Users/vitoralencar/Projetos/Agendakids/platform/platform/config/application.rb:8:in `<top (required)>'
/Users/vitoralencar/Projetos/Agendakids/platform/platform/Rakefile:4:in `require'
/Users/vitoralencar/Projetos/Agendakids/platform/platform/Rakefile:4:in `<top (required)>'
NoMethodError: undefined method `atinrequire' for main:Object
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/activerecord-4.2.4/lib/active_record/associations.rb:1:in `<top (required)>'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/activerecord-4.2.4/lib/active_record/base.rb:303:in `<class:Base>'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/activerecord-4.2.4/lib/active_record/base.rb:269:in `<module:ActiveRecord>'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/activerecord-4.2.4/lib/active_record/base.rb:26:in `<top (required)>'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/bundler/gems/paranoia-bd3383729c79/lib/paranoia.rb:208:in `<top (required)>'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
/Users/vitoralencar/.rvm/gems/ruby-2.2.2@agendakids-ruby-2-2-2/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
/Users/vitoralencar/Projetos/Agendakids/platform/platform/config/application.rb:8:in `<top (required)>'
/Users/vitoralencar/Projetos/Agendakids/platform/platform/Rakefile:4:in `require'
/Users/vitoralencar/Projetos/Agendakids/platform/platform/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

Rails 4.2
Paranoia 2.1

I tried:

  • bundle exec rake
  • bundle update rake
  • Reinstall paranoia
  • Delete Gemfile.lock and bundle install
@rbr
Copy link
Contributor

rbr commented Jun 13, 2016

Is it possible for you to update bundler to 1.12.0+? As pointed out in rubygems/bundler#4182 (which is fixed in bundler 1.12.0), the real error is swallowed which makes it much harder to solve.

@joaomarceloods
Copy link
Author

I used a different gemset with RVM and the problem stopped happening.

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

No branches or pull requests

2 participants