/ 19.Nov.2008
# install the required gem dependency:Provided you did this in a web accessible location, you should be able to log into Mephisto now. The magic is freezing Rails to 2.0.2, updating the boot.rb file to force 2.0.2 to be used and overriding Ruby 1.8.7's Enumerate weirdness. If you're using Ruby Enterprise Edition, you can ignore the 'unless' section above since REE is still 1.8.6. Make sure to install tzinfo with REE's gem binary, though, or mod_rails will give you a nice FAIL message when you try to access Mephisto.
sudo gem install tzinfo
# get Mephisto from GitHub
wget http://github.com/technoweenie/mephisto/tarball/master.tar.gz
# untar the file and cd into the directory
tar zxvf technoweenie-mephisto-*.tar.gz
cd technoweenie-mephisto-*
# put the 2.0.2 version of Rails on ice
rake rails:freeze:edge RELEASE=2.0.2
# use the 2.0.2 boot file in Mephisto
cp vendor/rails/railties/environments/boot.rb config/boot.rb
# create your production database
mysqladmin create mephisto_production
-- do the usual config/database.yml username/password/database setup--
# hack Mephisto to work with Rails 2.1.2 and Ruby 1.8.7
vi config/boot.rb and add the following lines at the top:
RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION unless '1.9'.respond_to?(:force_encoding) String.class_eval do begin remove_method :chars rescue NameError # OK end end end
# bootstrap the production database
rake db:bootstrap RAILS_ENV=production
# restart your webserver for good measure
sudo /etc/init.d/apache2 restart
© 2008; powered by ruby enterprise edition and mephisto
4 Comments
Leave a Comment