Very strange problem: Ton's of ruby process just running simple command "rails --version" or "rails

Very strange problem: Ton’s of ruby process just running simple command
“rails --version” or “rails new test1"”

I have very strange problem. I try to run this simple command
“rails new test1” --> this suppose to be create a new rails site.
“rails --version” --> even this I got ton’s of ruby process

but I got a lot of ruby process,
http://imageshack.us/photo/my-images/12/tonsofrubyprocess.png/

Here is my environment
rvm --version rvm 1.7.2
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.6.0]
rails-3.2.1

Any one every has the same problem?

On 1 February 2012 20:04, Steve R. [email protected] wrote:

Here is my environment
rvm --version rvm 1.7.2
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.6.0]
rails-3.2.1

No idea why but in the quest for more information, do you get any
errors? Does the command work?

Colin

Colin L. wrote in post #1043562:

No idea why but in the quest for more information, do you get any
errors? Does the command work?

Colin

The command is not working and no error.

Just simple commands below, it just hang there until i pressed control c
rails --version
rails new test1

I am using MAC OS snow leopard.

Is there away to find out from the log what is happening?

I try to remove everything using rvm to remove ruby 1.9.2 and all its
gems and reinstall again. but still having the same problem

Any suggestion?

Thanks Peter, for excellent way to troubleshoot it.

here is the ouput
https://gist.github.com/1721589

in summary below
robinhood:~ steve$ cat ~/.railsrc
cat: /Users/steve/.railsrc: No such file or directory

robinhood:~ steve$ rvm current
[email protected]

robinhood:~ steve$ rvm gemdir
/Users/steve/.rvm/gems/[email protected]

robinhood:~ steve$ cd /Users/steve/.rvm/gems/[email protected]

robinhood:[email protected] steve$ cat Gemfile
cat: Gemfile: No such file or directory

robinhood:[email protected] steve$ gem list rail

*** LOCAL GEMS ***

rails (3.1.0.rc6, 3.0.10, 3.0.3)
railties (3.1.0.rc6, 3.0.10, 3.0.3)
robinhood:[email protected] steve$ which rails
/Users/steve/.rvm/gems/[email protected]/bin/rails
robinhood:[email protected] steve$ ruby -ve ‘puts 4’
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.6.0]
4

Thanks for you help,
Steve

On Wed, Feb 1, 2012 at 10:20 PM, Steve R. [email protected]
wrote:

Just simple commands below, it just hang there until i pressed control c
Any suggestion?

A few random thoughts … show us output from those commands below.

$ cat ~/.railsrc

$ rvm current

$ rvm gemdir

go into that gemdir and have a look at the gems.

$ cat Gemfile

$ gem list rail # Without s

$ which rails

$ ruby -ve ‘puts 4’

For your reference, I am showing the output I see here in a recently
installed 3.2.1 project:

$ cat ~/.railsrc
–skip-bundle
-T
-d postgresql

$ rvm current
[email protected]

$ rvm gemdir
/home/peterv/.rvm/gems/[email protected]

$ cat Gemfile
source ‘https://rubygems.org

gem ‘rails’, ‘3.2.1’

Bundle edge Rails instead:

gem ‘rails’, :git => ‘git://github.com/rails/rails.git’

gem ‘pg’

Gems used only for assets and not required

in production environments by default.

group :assets do
gem ‘sass-rails’, ‘~> 3.2.3’
gem ‘coffee-rails’, ‘~> 3.2.1’

See https://github.com/sstephenson/execjs#readme for more supported

runtimes

gem ‘therubyracer’

gem ‘uglifier’, ‘>= 1.0.3’
end

gem ‘jquery-rails’

To use ActiveModel has_secure_password

gem ‘bcrypt-ruby’, ‘~> 3.0.0’

To use Jbuilder templates for JSON

gem ‘jbuilder’

Use unicorn as the web server

gem ‘unicorn’

Deploy with Capistrano

gem ‘capistrano’

To use debugger

gem ‘ruby-debug19’, :require => ‘ruby-debug’

$ gem list rail

*** LOCAL GEMS ***

rails (3.2.1)
railties (3.2.1)

$ which rails
/home/peterv/.rvm/gems/[email protected]/bin/rails

$ ruby -ve ‘puts 4’
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]
4

HTH (this is somewhat random probing …)

Peter

Really thanks for the instruction.

Here is the output after above instructions
https://gist.github.com/1722814

Yes, you are right it hang right on this step (I wait for 10 minutes and
still the same)
“rails new new_app --skip-bundle”

I have two exactly “clone” machine. One I did not remove using rvm (this
for backup because I don’t want to mess up my current development
environment) and another one I remove everything using rvm. (This where
I do the testing to figure out the problem with rails).
The reason you see “old” rails because the previous reference run on the
machine which still have not removed everything. Sorry for the
confusion,

So now, both this run on fresh rvm
https://gist.github.com/1722814
https://gist.github.com/1722825

And I still have problem. I kind of confuse where to troubleshoot
further, may be the best way is to format everything and start from
fresh Mac OS install


and here is the reference
https://gist.github.com/1722825

robinhood:junk89 steve$ cat ~/.railsrc
cat: /Users/steve/.railsrc: No such file or directory
robinhood:junk89 steve$ rvm current
[email protected]_rails
robinhood:junk89 steve$ rvm gemdir
/Users/steve/.rvm/gems/[email protected]_rails
robinhood:junk89 steve$ cat Gemfile
cat: Gemfile: No such file or directory
robinhood:junk89 steve$ gem list rail

*** LOCAL GEMS ***

rails (3.2.1)
railties (3.2.1)
robinhood:junk89 steve$ which rails
/Users/steve/.rvm/gems/[email protected]_rails/bin/rails
robinhood:junk89 steve$ ruby -ve ‘puts 4’
ruby 1.9.3dev (2011-07-31 revision 32789) [x86_64-darwin10.8.0]
4
robinhood:junk89 steve$

On Thu, Feb 2, 2012 at 6:04 AM, Steve R. [email protected]
wrote:

robinhood:~ steve$ rvm gemdir
/Users/steve/.rvm/gems/[email protected]

robinhood:~ steve$ cd /Users/steve/.rvm/gems/[email protected]

Sorry that I was not clear here. I meant the cat Gemfile to
be executed in your home directory.

$ cd
$ cat Gemfile

But probably, there is no Gemfile there.

/Users/steve/.rvm/gems/[email protected]/bin/rails
robinhood:[email protected] steve$ ruby -ve ‘puts 4’
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.6.0]
4

Is there any chance that the 3.1.0.rc6 is used and has a known bug ?

Actually, something I don’t understand. IIRC (??) you said, you threw
away everything and reinstalled rails. But how come we have these
“old” versions or Rails then ?

What happens when you do this as a fresh new install :

I copied the output on my side in https://gist.github.com/1722491

$ cd
$ rvm install ruby-1.9.3 # this will install 1.9.3-p0
$ rvm use ruby-1.9.3
$ rvm gemset create new_rails
$ rvm gemset use new_rails
$ gem install bundler
$ gem install rails # this will install rails 3.2.1
$ rails new new_app --skip-bundle
$ # in previous tests, you never arrived here ?
$ cd new_app
$ vim Gemfile # active therubyracer
$ bundle install
$ rake environment # should not fail

HTH,

Peter

On Thu, Feb 2, 2012 at 11:48 AM, Steve R. [email protected]
wrote:

for backup because I don’t want to mess up my current development
environment) and another one I remove everything using rvm. (This where
I do the testing to figure out the problem with rails).
The reason you see “old” rails because the previous reference run on the
machine which still have not removed everything. Sorry for the
confusion,

So now, both this run on fresh rvm
https://gist.github.com/1722814

Ah, sorry I forgot to ask you to show the rvm version …

$ rvm version # this is the latest “stable” version

rvm 1.10.2 by Wayne E. Seguin [email protected], Michal P. <
[email protected]> [https://rvm.beginrescueend.com/]

I presume you have a quite old version of rvm, since it sets you up with
this:

ruby-1.9.3-preview1

I wrote in my previous mail

$ rvm install ruby-1.9.3 # should install 1.9.3-p0

and that did not seem to succeed.

So, next try:

  • on both machines

$ rvm version # this could be different and the root cause ??

  • on the “test” machine

$ rvm get stable
… (download, build, install)
rvm 1.10.2 by Wayne E. Seguin [email protected], Michal P. <
[email protected]> [https://rvm.beginrescueend.com/]

RVM reloaded!
~/be$ rvm version

And then reinstall ruby

$ rvm reinstall ruby-1.9.3 # => check explicitly for 1.9.3-p0

$ rvm list

rvm rubies

jruby-1.6.5.1 [ i386 ]
jruby-head [ i386 ]
ruby-1.8.7-p352 [ i686 ]
ruby-1.8.7-p357 [ i686 ]
=* ruby-1.9.3-p0 [ i686 ]
ruby-head [ i686 ]

=> - current

=* - current && default

* - default

And hopefully it works now ?

HTH,

Peter

On Thu, Feb 2, 2012 at 3:13 PM, Steve R. [email protected]
wrote:

Hi Peter,

You really deserve …

Let’s wait with that until it actually works :slight_smile:

Now you have new version of everything (I believe), and I see
you are on 64 bit Darwin 10.8.0

robinhood:junk106 steve$ ruby --version
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]
robinhood:junk106 steve$ rails new new_app --skip-bundle
^C

I propose someone else with access to a Mac checks this out ?

Honestly, this exact problem already half year, I just postpone it until

I need to create a new rails problems from template

Any ideas what changed at that time?

Peter

Hi Peter,

You really deserve the MEDAL of HONOR in helping ways to solve these.
So far, it still not able to pass that ton’s of ruby process problems.

https://gist.github.com/1723620

At least now, I know i have old rvm and be able to update it already.

Seems like there already several test to resolve it, replacing rails to
ruby to rvm.

Honestly, this exact problem already half year, I just postpone it until
recently
I need to create a new rails from template

Thanks Peter,

Since I have machine to experiment with, in the near future, I might
reinstall from fresh. In the past, this machine (Mac Book Pro and
MacMini), Ruby on Rails with that simple statement work.

but somehow, don’t know what cause it and when it happen and why it
happen, suddenly just stop working.

And the funny thing is, others than that ruby generations, “rails
server” working just fine

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