February 22, 2009

HOWTO: Install a rails stack with ruby-enterprise and passenger on CentOS

0  comments

Preparations: Install CentOS with Apache and Mysql. 1. Install ruby enterprise:
wget http://rubyforge.org/frs/download.php/41040/ruby-enterprise-X.X.X-X.tar.gz
tar xzvf ruby-enterprise-X.X.X-X.tar.gz
./ruby-enterprise-X.X.X-X/installer
2. Create some links:
ln -fs /opt/ruby-enterprise-1.8.6-20080624 /opt/ruby-enterprise
ln -fs /opt/ruby-enterprise/bin/gem /usr/bin/gem
ln -fs /opt/ruby-enterprise/bin/irb /usr/bin/irb
ln -fs /opt/ruby-enterprise/bin/rake /usr/bin/rake
ln -fs /opt/ruby-enterprise/bin/rails /usr/bin/rails
ln -fs /opt/ruby-enterprise/bin/ruby /usr/bin/ruby
3. gem install rails -v 2.X.X Problems: I've got problems with missing Mysql libraries. To fix this: 3.1 Install mysql-devel
yum install mysql-devel
3.2 Install mysql-gem
/opt/ruby-enterprise-1.8.6-20080624/bin/ruby /opt/ruby-enterprise-1.8.6-20080624/bin/gem install mysql -- --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib64/mysql
4. Passenger (mod_rails) 4.1 Install Passenger (mod_rails)
gem install passenger
4.2 Passenger Apache Module
passenger-install-apache2-module
5. ImageMagick 5.1 Install ImageMagick Libraries
yum install ImageMagick-devel
5.2 Install rmagick via gems
sudo gem install --no-rdoc --no-ri --no-update-sources rmagick -v 1.15.15
Problems: Parameter --version doesn't work. Don't use the parameter "--version" Read more about this problem: http://www.beanlogic.co.uk/2008/8/13/installing-a-specific-verison-of-rmagick Missing msfonts Installation of msfonts according to: http://hi.baidu.com/rainchen/blog/item/089ef7364497de320a55a9a3.html
wget http://www.osresources.com/files/centos-windows-fonts/msfonts.tbz
mkdir /usr/share/fonts/default/TrueType
tar xvjpf msfonts.tbz -C /usr/share/fonts/default/TrueType/
6. Config of apache and your rails app For configuration of passenger follow the instructions there Thats it!

Tags

cent os, howto, Linux, mod-rails, passenger, Projects, rails, Ruby, Ruby on Rails, ruby-enterprise


You may also like

Blog url changed to https

I just changed the url of this blog to https://jensjaeger.com. TLS encryption is now the default for all request to this page. It might be possible that some image links on some articles are hard coded http. If you find such an error it would be nice if you leave me comment so i can

Read More

Format date and time in java with prettytime

Prettytime is a nice java library to format a java Date()s in a nice humanized ago format, like: moments ago 2 minutes ago 13 hours ago 7 months ago 2 years ago Prettytime is localized in over 30 languages. It’s super simple to use Add the dependency to your maven pom: org.ocpsoft.prettytime prettytime 3.2.7.Final or

Read More