Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
RVM and Bundler on Dreamhost
# Step One - Installing RVM
curl -L | bash -s stable --ruby
# Then, install ruby 1.8.7 -- you need to basically match the same version of Ruby as Dreamhost
rvm install ruby-1.8.7-p334
# I also create a gemset, although this is probably optional
rvm gemset create sinatra
rvm use 1.8.7@sinatra
# My project has this very simple .rvmrc
rvm 1.8.7@sinatra
# Install bundler next:
gem install bundler
# Step Three - Setup Gemfile
# In your Gemfile, you will need to match the version of rack being used on Dreamhost, which is currently 1.2.1:
gem "rack", "=1.2.1"
# Step Three - Setup
#!/usr/bin/env ruby
require 'rubygems'
require 'rubygems'
require 'bundler'
require 'mufftweet'
run MuffTweet
# Recently I had some problems with my apps on Dreamhost, and I switched to using
# a vendored bundle. I ran this command within each of my projects:
bundle install --path vendor
# This installs the gems you need in a vendor/ folder within your project.
# Finally, if you need something to run in cron, you can do it like this:
# The ". ~/.bash_profile" bit loads in the RVM functions that you will need to run anything in cron.
*/10 * * * * . ~/.bash_profile; cd /home/username/appname; /home/username/appname/cron.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.