Rails Setup

I have setup development environments for Ruby on Rails before but have not had to do it for production. I am looking for the absolute best way to set this up and maintain this for a production environment. I keep getting conflicting advice in my research. For instance (source install ruby gems)

http://wiki.rubyonrails.org/getting-sta … nux-ubuntu">http://wiki.rubyonrails.org/getting-started/installation/linux-ubuntu

http://library.linode.com/frameworks/ru … an-5-lenny">http://library.linode.com/frameworks/ruby-on-rails-nginx/debian-5-lenny

etc.

Ideally I want a repository such as dotdeb to manage this. Luckily I found this:

http://www.dotdeb.org/tag/ruby-on-rails/

So this is probably how I will link Ruby on Rails up with the Nginx server. However I am still not sure about the latest version of Ruby Gems or a repository that contains all of this. Apparently the debian version of gems is to old?

Any insight would be outstanding for this Rails server setup noob.

Current setup:

Debian 6 Linode 512 (will be upgraded to a 768 soon)

Monit

Fail2ban

No ftp

Dotdeb repository:

Nginx

PHP

MySQL

5 Replies

I'd start with something like

https://github.com/joshfng/railsready

You might need to modify those scripts to suit your needs, but it will at least get you started with ruby 1.9.2, rails, bundler, passenger, git, and some other stuff you will likely need.

If you're happy with nginx, I'd suggest using phusion passenger along with Ruby Enterprise Edition (an optimized version of 1.8.7, and despite the name, it's free)

http://www.modrails.com/install.html

http://www.rubyenterpriseedition.com/

If you use REE then you can keep it separate from your distribution's version.

Also look at Capistrano for deployment, which make sure you do it the same way all the time and gives an easy rollback.

Sean

I will definitely check out Ruby Enterprise Edition on my dev box this weekend. This is very helpful. I hear a lot about Capistrano as well. So I will check this out to.

Thanks for the info!

I'm in the process of setting up a Debian and nginx box at the moment intended solely for Ruby on Rails applications. I've done a few steps, but now have a query as I'm very new to the Ruby/RoR ecosystem.

So far I have:

Put dotdeb in my sources.list and installed nginx-extras which includes Passenger. nginx is 1.0.6 and Passenger is 3.0.8.

Installed RVM as root, and set Ruby 1.9.2 to be the default.

In most/all tutorials I've found, one is instructed to install Passenger via the Gem. Is there any advantage to having Passenger installed via dotdeb's package, or should I be installing Passenger via a gem as I have Ruby installed via RVM?

If I stick to the dotdeb package version of Passenger, I think I need to read up on configuring it next… any pointers on that appreciated.

Wish I could help but I decided to go with Tornado rather than Rails for this particular site. Found it better for my needs.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct