Project wide rvm setup with .rvmrc Files
Working with RVM (Ruby Virtual Machine), i found it a quite useful manner to create ’.rvmrc’ files on a per-project base. You simply create a file called .rvmrc in your project directory. Basically what happens, when rvm discovers this file, is that it’s content is directly executed.
So you maybe should step back from stuff like:
rm -rf /
or such.
Anyway, most common use case is to simply tell rvm which ruby version to use:
rvm 1.8.7
or if you want to specify a gemset:
rvm 1.8.7@myprojectgemset
Anyway, you should checkout the ’Best Practices’, think about it, and consider project-based .rvm files as a great help when it comes to deploying your application.
Bring Capistrano to bundle
Capistrano should bundle.
To do , do this:
require 'bundler/capistrano' The old style:
task :bundle, :role => [:app, :web] do
deploy.create_bundler_symlink
run “cd #{release_path} ; bundle check 2>&1 > /dev/null ; if [ $? -ne 0 ] ; then sh -c ‘bundle install –disable-shared-gems –without test’ ; fi”
end
> Discussion:
Use Bundler in Rails 2.3 Projects
In order to get Crabgrass working with bundler (this will fix some issues), i am using this technique.
I hope you enjoy it.