RubyFlow The Ruby and Rails community linklog

Rails 3.0 Beta Setup with RVM + Ruby 1.9.2

Here are some tips for setting up a Rails 3.0 Beta environment using RVM and Ruby 1.9.2

Comments

Please leave comments on the post if you have any issues.

Rails 3 works well on simple scaffold blog application with ruby 1.9.2 for me, except it works slower than Rails 2 :(

Try this:

  1. generate scaffold title:string body:text (sqlite3)
  2. run server in production mode
  3. ab -n 1000 http://localhost:3000/posts (on 20 records)

I’ve got about 50 req/s for Rails 2 and only 35 req/s for the same page, which is strange after all that buzz about performance optimizations in Rails 3. It seems all improvements was ruby 1.8.7 only (haven’t checked if Rails 3 is really faster on 1.8.7 though).

Also in development environment performance degradation comparing to Rails 2 is even worse :(

wondering: I’m wondering if that’s because you have Mongrel installed and so Rails 2’s ./script/server is using that whereas you’re stuck with WEBrick on 1.9 with “rails s”..?

@wondering try it with something like unicorn.

@PeterCooper Well, no. I’ve double checked the list of gems for Rails 2 and Rails 3 to be sure(I use RVM gem sets to separate installs). I’ve also benchmarked Rails 3 and Rails 2 using WEBrick and Mongrel and have similar results: Rails 3 is slower in both cases (WEBrick is not much slower than Mongrel at least on 1 concurrent request).

@Chris and @PeterCooper I’m wondering if you have different results, guys.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in