I am in process of installing Redmine app via RedmineInstall documentation I try step 5 :
bundle exec rake db:migrate
then error shows :
bundler: command not found: rake
Install missing gem executables with ´bundle install´
I use redmine 3.3.0 64 for windows
I use redmine gemfile and rake was installed (i see Using rake 11.2.2)
I tried reinstall it via bundle install or gem install/uninstall, but did not help (see Successfully installed rake-11.2.2 but rake do not work).
I tried this command from ruby/bin directory or redmine directory not success.
I do not understand, that rake is successfully installed, but when i try use it with bundle it says that command not found.
The problem may be in the directory where the Redmine or rake?
Try rake db:migrate in your redmine directory without bundle exec and see if that resolves your issue.
Bundler usually provides bin stubs for rake and other gem files, so that bundle exec is not necessary or will even fail because it will look in an other gem directory where, in this case, rake might not be installed.
When running rake commands, I get this error:
You have already activated rake 10.0.2, but your Gemfile requires rake 11.1.1.
Prepending `bundle exec` to your command may solve this.
How do I fix this so that I don't have to run bundle exec before every rake command?
I uninstalled rake and reinstalled, but it's still looking for an older version:
C:/Ruby22-x64/bin/rake:22:in `load': cannot load such file -- C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/rake-10.4.2/bin/rake (LoadError)
from C:/Ruby22-x64/bin/rake:22:in `<main>'
run
$ bundle update rake
that worked for me.
see the documentation.
http://bundler.io/v1.3/man/bundle-update.1.html
Pretty simple:
gem install rake -v 11.1.1
For me it was just that I needed to use sudo bundle exec rake <...>, maybe it can help someone else...
(I was trying to install concerto on a RaspberryPi, FYI)
UPDATE:
gem 'rake','10.0.2' in gemfile
gem uninstall rake
remove gemfile.lock
bundle update rake
Simply remove your gemfile.lock and do bundle install :)
simply write this
gem install rake
Check your Gemfile.lock for rake version, you should find something like
rake (10.0.2)
If you found the above then you have to remove your gemfile.lock then run bundle install again.
And it wouldnt hurt to double check that you are on the right project.
just write a command starting with bundle exec example bundle exec rake db:schema
The problem is your installed rake has a different version to the rake in your Gemfile.lock. Just go in there, Cmd + F to search for 'rake', change the version number to the one that terminal wants.
The problem is the rake version you are using is not same as that in your Gemfile, you must make sure of that there's no difference, you can also take no more bundle exec ... with rubygems-bundler
gem install rubygems-bundler
next run (once)
gem regenerate_binstubs
I am required to run the following Ubuntu bash script as "sudo" (FYI, this is because I am running it through Upstart):
cd /u/apps/MyRailsApp/current && /usr/bin/env RAILS_ENV=production script/delayed_job restart >> /var/log/upstart/delayed_job.log
However, when I run it as "sudo", I get the following error:
/var/lib/gems/1.9.1/gems/bundler-1.7.6/lib/bundler/source/git.rb:188:in rescue in load_spec_files': git#github.com:MyRemoteRepo/my_gem.git (at 1.0.1) is not yet checked out. Runbundle install` first. (Bundler::GitError)
It's not recommended to run "bundle install" as Sudo. When I run "bundle install" as a non-admin user, it is working and all the gems are recognized. How do I get the root user to recognize the gem?
The gem is in /home/ubuntu/.bundler/ruby/1.9.1/. My other gems are in /var/lib/gems/1.9.1/gems/
Thanks so much for your help.
Try adding "source /home/[username]/.bashrc" where [username] is non-admin user that can run the script successfully.
I seem to have a similar problem as this post, where Bundler complains of a gem not being checked out. However, mine shows an error when running a rake task using a cron job. (Otherwise, the site seems to deploy fine in production using Phusion Passenger, and the rake task runs when called in the command line )
The error is:
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/source.rb:571:in load_spec_files': git://github.com/moneill/Google-Maps-for-Rails.git (at modified_markers) is not checked out. Please runbundle install` (Bundler::GitError)
I tried using bundle install --deployment ; bundle pack followed by bundle install --path vendor/cache.
One thing I haven't tried is to locally compile the git project and install the gem in the vendor/bundle folder. I am not using RVM for this particular server.
The cron job command is cd /home/[dir]/[rails_app_folder]/ && RAILS_ENV=production /usr/local/bin/bundle exec rake [task] --trace
Thank you!
I'm trying to work through this tutorial by Andrew Perkins. When I get to rake db:migrate I get this error and similar subsequent errors every time I install the missing gems.
Could not find rake-0.9.2.2 in any of the sources
Run bundle install to install missing gems.
I've run the bundle install but not sure I've installed properly or with all the right dependencies. I'm pretty new to Rails so don't have a great idea as to where I'm going wrong so any examples of proper installation would be very helpful.
Try
bundle exec rake db:migrate
this ensures that the rake command run is the one specified in your project's Gemfile. You can read more about bundle exec in the docs.