Reputation: 2120
when i trying to perform any of rake
command it will so me this error
shared_helpers.rb:78: warning: Insecure world writable dir /opt/android-sdk/tools in PATH, mode 040777
rake aborted!
Gem::LoadError: You have already activated rake 11.1.2, but your Gemfile requires rake 11.1.1. Prepending `bundle exec` to your command may solve this.
/home/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/runtime.rb:34:in `block in setup'
/home/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/runtime.rb:19:in `setup'
/home/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler.rb:92:in `setup'
/home/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/setup.rb:8:in `<top (required)>'
/home/examples/demo_app/config/boot.rb:3:in `<top (required)>'
/home/examples/demo_app/config/application.rb:1:in `<top (required)>'
/home/examples/demo_app/Rakefile:4:in `<top (required)>'
LoadError: cannot load such file -- bundler/setup
/home/examples/demo_app/config/boot.rb:3:in `<top (required)>'
/home/examples/demo_app/config/application.rb:1:in `<top (required)>'
/home/examples/demo_app/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
help me solve this thank you.
Upvotes: 0
Views: 134
Reputation: 2183
This issue comes up when your Gemfile.lock
has different versions of the gems installed on your machine. A warning comes up as :
You have already activated rake 11.1.2, but your Gemfile requires rake 11.1.1. Prepending
bundle execto your command may solve this.
Adding bundle exec
forces bundler to run the command ignoring difference of version.
Fortunately, there is a gem that solves this: rubygems-bundler.
> gem install rubygems-bundler
> gem regenerate_binstubs
After this try your rake commands it will work fine.
Upvotes: 1
Reputation: 2120
Remove particular version of rake
with command of gem uninstall rake
and it will allow you to run rake
command
Upvotes: 0