Its all about Ruby On Rails
Posts tagged hosting
Change timezone of ubuntu machine from command line
Jul 15th
If you guys want to change timezone of your ubuntu machine then you can do it by issuing:
dpkg-reconfigure tzdata
This may be helpful if you deal with servers.
Hassle free installation of rails stack on debian based system
Feb 23rd
Want to install rails stack on a machine? Just follow these steps. It will setup a rails stack(Apache + passenger + mysql + ruby + rubygems + common gems + git) on any server(debian based)
- apt-get update
- apt-get upgrade -y
- apt-get -y install build-essential libssl-dev libreadline5-dev zlib1g-dev
- apt-get -y install mysql-server libmysqlclient15-dev mysql-client
- apt-get -y install ruby ruby1.8-dev irb ri rdoc libopenssl-ruby1.8
- install rubygems manually:
- download rubygems form rubyforge, >=1.3
- unzip files
- ruby setup.rb
- Check that gem command is in path. Sometimes ‘gem1.8′ is available but ‘gem’ not. In that case copy /usr/bin/gem1.8 to /usr/bin/gem using “cp /usr/bin/gem1.8 /usr/bin/gem”
- apt-get -y install libmagick9-dev
- apt-get -y install imagemagick
- apt-get -y install postfix mailx
- apt-get -y install apache2
- apt-get -y install apache2-prefork-dev
- wget http://webonrails.com/wp-content/plugins/download-monitor/download.php?id=7
- ruby install_gems.txt
- passenger-install-apache2-module
-
Download git from git-scm.com
- Unzip files
- ./configure –without-tcltk
- make -j 2
- make install
You are all set now, go deploy you rails app. I have tested it on linode(ubuntu8.10), slicehost(ubuntu 8.10), should work for you too
WebByNode: A New Hosting Service Launching Soon
Nov 9th
Guys, I received a mail today that there will be a new hosting service launching soon. They said that it makes easier to deploy your applications. Whether its Ruby on Rails, Django, LAMP or your choice of Linux Distribution, its a ready-to-go solution. For more information please visit http://www.webbynode.com/
I am signing up there as a beta tester. Lets see how webby-node can help rails community by its services.
Hosting Rails app and WordPress on same domain(as folder instead of subdomain)
Aug 8th
Hey guys, Yesterday I did an interesting server configuration. Actually we had a rails app hosted on server which is using passenger(a.k.a mod_rails). This application can be access by going to http://domain.com . Also we had a wordpress running which could be access by going to http://blog.domain.com.
But, for SEO sake I had to change configuration so that wordpress can be access by http://domain.com/blog instead of http://blog.domain.com/
The problem was if I configure wordpress for http://domain.com/blog and go to this url, the request was handled by rails app because of domain.com virtualhost.
So what I did? I changed apache virtualhost configuration for http://blog.domain.com and http://domain.com as:
<virtualHost *>
ServerName blog.domain.com
DocumentRoot /var/www/html/wordpress/
<directory "/var/www/html/wordpress/">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</directory>
</virtualHost>
<virtualHost *>
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /var/www/html/domain/current/public
<directory "/var/www/html/domain/current">
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</directory>
RailsAllowModRewrite on
RewriteRule ^/blog/?(.*)$ http://blog.domain.com/$1 [P,NC,L]
</virtualHost>
Also I created a symbolic link to wordpress installation directory under rails public folder(ln -s /var/www/html/wordpress /var/www/html/railsapp/public/blog).
Now remember to change your wordpress address and blog address options to http://domain.com/blog under settings tab of wp-admin section.(Thanks Amit for pointing this out)
I restarted apache and it worked fine. WordPress was running at http://domain.com/blog and rails app was as http://domain.com/.
Update: If you want to change your wordpress permalink structure in account of SEO please change “AllowOverride None” to “AllowOverride All” as shown in image below.
Engine Yard: Best Hosting for rails applications
Mar 20th
Today I deployed my rails application to Engine Yard server. They have great configuration, ultimate cluster architecture(physical clusters then logical clusters). They have separate servers for SSH, email, web, app etc… . Servers are managed by top architects, I should say they are expert in rails application deployment.
