Everything takes forever

I installed ruby on rails with the one-click-installer. When I do a
rails x or start the server, or make a controller etc basically anything
that requires ruby is VERY VERY VERY SLOW. I used to run this on my old
contoller which in comparison is much slowe and it would run these
things fast.

On this Core 2 Duo, with 2gbs of ram, the thing takes forever. I don’t
know if this is a ruby problem thats just recent but I mean usually it
takes a couple seconds but not something like a minute.

Any suggestions.?

A little more info about your environment might be helpful. What OS?
What version of rails and ruby, etc.

Windows probably - Instant Rails?

Marcelo de Moraes S. wrote:

Windows probably - Instant Rails?

Well it is windows. But it was the one-click installer from the ruby on
rails website. The one they link to.

Thank you for your reply.

Why don’t you use script/server for development?

Marcelo de Moraes S. wrote:

Why don’t you use script/server for development?

I do. the script server is a ruby script, and that too takes probably 2
mins to load up. I’m trying to figure out what I can do to speed up
ruby.

Steve R. wrote:

How long does it take if you do:

ruby -v

I’m running Windows inside of Parallels on a Macbook Pro and Rails is
plenty perky (I hand installed everything, but I don’t imagine it’s
much different).

it takes 1 one thousand 2 one thousand 3 one thousand. Said orally.

On Sep 24, 2007, at 4:45 PM, Jason Stiebs wrote:

it takes 1 one thousand 2 one thousand 3 one thousand. Said orally.

Gee… So it has nothing to do with InstantRails.

On my machine, the first invocation (again, a Macbook Pro and
Parallels, so yours should be faster) took less than one second. All
subsequent ones were instant (the EXE was cached, I presume). If just
running ruby -v takes 3 seconds, it’s no wonder you’re not achieving
good performance starting a whole server.

I can tell you that a couple of old Dells I have lying around
gathering dust achieve good speed despite being pretty old
technology. If you lots of stuff in your working set, consider
shutting some of it down. This would be true on any machine. If
Windows indexing service is running, take it out in the yard and
shoot it. If you have Google Desktop installed, take it out in the
yard too. Do the same.

I don’t know what else to say. Running a command line tool like Ruby
should be pretty snappy.

Alright I made a mistake I did rails -v :slight_smile: and that took 3 seconds. the
ruby -v was reallly quick. Hmm so it must be something with rails. Could
it be that when I installed the instant rails I had to go gem install
rails ? I had to cause it wasn’t recognizing any commands.

Give it a shot. No way should you be getting such crummy performance.

How long does it take if you do:

ruby -v

I’m running Windows inside of Parallels on a Macbook Pro and Rails is
plenty perky (I hand installed everything, but I don’t imagine it’s
much different).

Jason Stiebs wrote:

Alright I made a mistake I did rails -v :slight_smile: and that took 3 seconds. the
ruby -v was reallly quick. Hmm so it must be something with rails. Could
it be that when I installed the instant rails I had to go gem install
rails ? I had to cause it wasn’t recognizing any commands.

Are you by any chance running those projects off of a Windows (Samba)
network share?
That’s notoriously slow for Rails development.


Roderick van Domburg
http://www.nedforce.com

Roderick van Domburg wrote:

Jason Stiebs wrote:

Alright I made a mistake I did rails -v :slight_smile: and that took 3 seconds. the
ruby -v was reallly quick. Hmm so it must be something with rails. Could
it be that when I installed the instant rails I had to go gem install
rails ? I had to cause it wasn’t recognizing any commands.

Are you by any chance running those projects off of a Windows (Samba)
network share?
That’s notoriously slow for Rails development.


Roderick van Domburg
http://www.nedforce.com

Nope. Its on a partition.

Well actually thats how I did it. Your way I don’t use instant rails or
anything of the like. I installed the one click installer, then
installed rails with dependencies. For developement I use RadRails. But
in rad rails or in the console i get really bad times.

I used to do this in school(independent study) and the load times were
great, but now I have a idea for a website and want to use ruby to make
it. I have this computer thats loads better then the old one and its
terrible slow.

Do you think it would speed up if I told it only to use one core of my
core 2 duo?

thanks for the help. I really appreciate it.

It sounds to me like something else is going on.
Create a brand-new Rails application and start up the server

rails foo
cd foo
ruby script/server

Now open up the task manager so you can see the processes

Does the Ruby process consume a lot of RAM or use a lot of CPU?

Can you identify any other running programs such as virus scanners, etc
that
might be goofing with the process? I’ve seen some security suites cause
problems with the Ruby interpreter on Windows.

Do this also:

ruby -v

It should say 1.8.6. Does it?

If you’re seeing scripts take 3 seconds to come up, that’s normal.
Anything
longer and there’s something really wrong with your machine.

Ruby on Windows is notoriously slower than on Mac or Linux, but it’s
manageable.

I would avoid InstantRails for development on Windows, personally. The
One-Click installer is perfectly fine.

Try this:

Delete c:\ruby

Install one cliick ruby installer (be sure to get the latest one)

After installation, open a new command prompt

Update rubygems

gem update --system

After that, install Rails

gem install rails --include-dependencies

Now run the Rails command

rails mytestapp

If you’re still experiencing problems, let me know. You might also be
interested in checking out the O’Reilly shortcut I wrote that details a
Windows installation.

Ahh yes it says 1.8.6 and no it doesnt take up alot.

ok… so it just cranks away.

Have you blown it all away and reinstalled like I suggested?

When you launch script\server… is there any other service that goes
nuts?

This is interesting to me… if you want to take the discussion off list,
contact me directly. I’ve not seen this problem before under these
specific
circumstances. Shoot me an email and I’ll help you troubleshoot it
further.

Brian H. wrote:

ok… so it just cranks away.

Have you blown it all away and reinstalled like I suggested?

When you launch script\server… is there any other service that goes
nuts?

This is interesting to me… if you want to take the discussion off list,
contact me directly. I’ve not seen this problem before under these
specific
circumstances. Shoot me an email and I’ll help you troubleshoot it
further.

Actually this time things worked better this is what I did.

gem unistall rails
gem cleanup
gem install rails --include-dependencies

and it works much much faster Thanks for all your help.