You have already activated rack 1.3.2, but your Gemfile requires rack 1.2.3. Consider using bundle exec

I have a problem when I try to run the application:

You have already activated rack 1.3.2, but your Gemfile requires rack 1.2.3. Consider using bundle exec. 

I read a lot about this error, but I did not find a solution that worked for me

  • I already deleted my Gemfile.lock and ran the package again, as suggested here
  • I already use the latest passenger version (3.0.8) - as suggested here
  • Three bundle exec rake cannot be used in my case

Thanks for the advance

+7
source share
2 answers

Run bundle install --binstubs and you will get the bin directory in the root of your application with all the executables needed for the application.

Then you need to add this directory to the path and the best place for it is.rvmrc if you use RVM.

 [ -d './bin' ] && export PATH=`pwd`/bin:$PATH 

or just run it. / bin / {rake | rails | etc} from your application root.

+4
source

Try the command prefix to start your server using the exec package, i.e.

 bundle exec rails server 

Or in production (if you use something like Unicorn

 bundle exec unicorn [options] 
+3
source

All Articles