简体   繁体   中英

Bundler in production not ignoring the development and test gems

I have a couple of rails websites in production on a ubuntu webserver of ours..

We're running Ubuntu 10.10 + Passenger and Apache.. and ruby enterprise edition version 1.8.7 (No RVM),

I've been having a problem with bundler on both the sites..

Whenever i restart the app by touching restart.txt or by rebooting the server, The user sees an error saying passenger could not be started because it couldn't find nokogiri (a requirement of one of the test gems) so i try and run 'bundle install' which fails cause it tries to install nokogiri..

I've tried running

bundle install --without development:test

And various other variations..

I think one of them worked until i restarted the app and we were back to square one again..

So for the moment i resigned myself to commenting out all gems in the development and test group..

Any ideas?

Thanks

Daniel


Oh i forgot to mention.. I'm deploying using capistrano :)

您必须为--without参数提供一个用空格分隔的列表,请参阅http://gembundler.com/man/bundle-install.1.html

You're missing a space. You should do:

bundle install --without=development:test

Try:

bundle install --without development test

or even:

bundle install --path vendor/bundle --without development test

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM