Rails development processes running very slow

This is a problem I know other people have been having. I’m on Rails
2.3.5 on a dual core 2.1Ghz Macbook Pro 2.1 with 3Gb of ram and 800Mb+
inactive memory. Things should be fast. Sometimes things run slowly,
but nothing nearly as slowly as rails. irb starts in milliseconds.
Even Java maven tasks are pretty fast. Rails on the other hand takes
a pitiful 1:30 minutes to start - the server, console, and tests.
Simple requests often take 5-10 seconds.

My ruby version:

ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.7.0]

I do have 208 gems installed, many of which are in use. That could be
the issue, or it could be some specific gem that’s causing a problem.

Either way, I’m presently missing the startup speed of Java, which
seems rather ironic.

My last rails project was with earlier versions when I never had a
problem.

Are there any known problems with gems or anything else that cause
this kind of issue?

Thanks.

I hope someone figures something out with this - I’m having similar
issues with ruby 1.9.1 and rails 3 on Windows, Ubuntu 9.04 or 9.10.
Nothing I do seems to help with the load time at all (30-60 seconds).

Alex wrote:

This is a problem I know other people have been having. I’m on Rails
2.3.5 on a dual core 2.1Ghz Macbook Pro 2.1 with 3Gb of ram and 800Mb+
inactive memory. Things should be fast. Sometimes things run slowly,
but nothing nearly as slowly as rails. irb starts in milliseconds.
Even Java maven tasks are pretty fast. Rails on the other hand takes
a pitiful 1:30 minutes to start - the server, console, and tests.
Simple requests often take 5-10 seconds.

My ruby version:

ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.7.0]

I do have 208 gems installed, many of which are in use. That could be
the issue, or it could be some specific gem that’s causing a problem.

Alright… Are you starting in development mode or in production mode?
Can we see your environment.rb (or the part that relates to gems anyway)
?
How big is your database?
Are you setting up activemailing ?

ChrisT wrote:

My Gemfile:
source ‘http://gemcutter.org
source ‘http://gems.github.com
gem “gemcutter”, “0.4.1”

Rails3 beta

gem “rails”, “3.0.0.beta”

ActiveRecord requires a database adapter.

gem “ruby-mysql”

Gems required for the AftershockHarness

gem “watir”, “1.6.5”
gem “firewatir”, “1.6.5”

Okay… Did you do ‘bundler lock’ ?
(I am shooting blind here, I’m confused by the problem, but sometimes
it’s like playing broadsides… start shooting and it starts making
sense!).

I’m running in development. Rails 3.0.0.beta, ruby 1.9.1p378.
My database is small (10 tables, 5-10 columns a table).
No activemailing.

My environment.rb (pretty sparse):

Load the rails application

require File.expand_path(’…/application’, FILE)

Initialize the rails application

TestHarness::Application.initialize!

My Gemfile:
source ‘http://gemcutter.org
source ‘http://gems.github.com
gem “gemcutter”, “0.4.1”

Rails3 beta

gem “rails”, “3.0.0.beta”

ActiveRecord requires a database adapter.

gem “ruby-mysql”

Gems required for the AftershockHarness

gem “watir”, “1.6.5”
gem “firewatir”, “1.6.5”

shoulda and factory_girl both have bugs in relation to Rails 3. So,

for now use the the repositories

in vendor/git.

These gems are both built from the git repos in vendor/git and then

copied over to vendor/cache.

If for any reason you need to regenerate these gems, cd into vendor/

git/ and then

issue a ‘gem build .gemspec’ command. This will produce a

new .gem file, which can be copied

(or moved) into vendor/cache.

Gems only used for testing

group :test do
gem “webrat”
gem “cucumber”
gem “shoulda”
gem “factory_girl”
end

Gems only used for development

group :development do

gem “ruby-debug19”, “0.11.6”

gem “wirble”
end

Either way it’s slow. with the bundle locked or not.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs