Bundler 1.0 without system gems
Wijnand Wiersma do 15 jul 10
The last time I talked about bundler I showed how to use the 0.9 series and everything will be in it’s own bundler bubble.
However, starting from bundler 1.0 systems gems will be prefered with sudo installs and this might be not what you want.
Some perfectly valid reasons might be:
- You are deploying to webservers as an unprivileged user and don’t want to sudo
- You don’t want the existing apps to break because incompatible gems are being installed
I was looking at the bundler source code for a solution and found out it was actually quite easy to solve.
Just add a path after “bundle install” !
So when installing an application on a production server you can let capistrano (or whatever you use for deployments)
run the following command: bundle install ~/.bundle
Inside the application a config file will be created and respected.
This configuration file consists of the following content:
--- BUNDLE_DISABLE_SHARED_GEMS: "1" BUNDLE_PATH: /Users/wijnandwiersma/.bundle
As long as this configuration exists the system gems will not be touched.
Until recently I wasn’t a big fan of bundler but because of this presentation I fully understand all decisions that made bundler the way it is. I think you should watch it too. I think I will convert some rails 2.3 apps in the near future.
Gepost in hor | 0 reacties
Welkom op Holland On Rails
Het startpunt voor Ruby On Rails in Nederland. Vind de laatste technieken, meningen en nieuwtjes.Recente Jobs
Gezocht: Ruby On Rails ontwikkelaar (junior of senior)
Eet, drink en droom jij over Ruby On Rails? Wil jij het liefste dag en nacht bezig zijn met jehobby; super coole webapplicaties ontwikkelen in Ruby On Rails?
Dan willen wij jou graag een podium bieden om je Ruby skills te vertonen aan onze nationale en internationale klanten!
@ Internetbureau Holder, Obdam
Bekijk alle jobs »»
Gereedschapskist
Onmisbare tools vooriedere developer!
- Ruby On Rails
Framework voor de web 2.0 developer. Eindelijk vooruitgang! - TextMate
Editor for true pro's
Typ, tab, top :-)
Nee, niet voor Win. - Made On A Mac
En nou is het over met die saaie grijze Windows bak van je!
Auteurs op deze site
Chris Obdam
'Less is more' evangelist, past dit ook dagelijks toe op zijn tandenborstel.Chiel Wester
Snelheidswonder op Ruby wielen. Leuk om mee te pair-programmen ;-)
Plaats je reactie