RoR Install On Ubuntu


1. install rails
sudo apt-get install rails

2. install rubygem

download new version:

http://rubyforge.org/frs/?group_id=126&release_id=11889

extract the file, cd /path/to/file

sudo ruby ./setup.rb

sudo gem update

3. install mongrel

before install mongre, install apt-get install build-essential.

sudo gem install mongrel –include-dependencies

cd /yourapp

sudo mongrel_rails start -d -e development

4. config apache / virtualhost

start proxy

cd /etc/apache2/mods-enabled/
sudo ln -s ../mods-available/proxy_balancer.load proxy_balancer.load
sudo ln -s ../mods-available/proxy_http.load proxy_http.load
sudo ln -s ../mods-available/proxy.load proxy.load
sudo ln -s ../mods-available/proxy.conf proxy.conf

sudo vim /etc/apache2/mods-available/proxy.conf

at line #11

change #Allow from .example.com to Allow from all

<VirtualHost *:80>
ServerName company.secure.praxislanguage.com
ProxyPass / http://localhost:3002/
ProxyPassReverse / http://localhost:3002/
ProxyPreserveHost on

DocumentRoot /var/www/secure.praxislanguage.com/public
<Directory /var/www/secure.praxislanguage.com/public>
Options FollowSymLinks
AllowOverride all
</Directory>
</VirtualHost>

sudo /etc/init.d/apache2 restart

ps: because I used activemerchant plugin, it needed to install openssl (sudo apt-get install libopenssl-ruby)

Tags:

No Related Posts

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts
[Symfony]Does not work under ‘prod’ on Mac
difference in ‘==’ and ‘===’

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

在新公司加油干,祝一切顺利.

Thank you