Project wide rvm setup with .rvmrc Files

Angelegt von andi Fri, 29 Apr 2011 10:04:00 GMT

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

Angelegt von suung Tue, 15 Mar 2011 11:34:00 GMT

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

Angelegt von suung Mon, 07 Feb 2011 16:12:00 GMT

In order to get Crabgrass working with bundler (this will fix some issues), i am using this technique.

I hope you enjoy it.