Segmentation fault

First of all, I use RVM and I installed ruby-1.9.2-head, which I used
to create a new rails3 gemset. Then I changed to that gemset with rvm
use 1.9.2-head@rails3 and I ran bundle install over the following
Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.0.0.beta4'

gem 'sqlite3-ruby', :require => 'sqlite3'

group :test do
  gem "rspec-rails", ">= 2.0.0.beta.12"
  gem "shoulda", :git => "git://github.com/thoughtbot/shoulda.git"
  gem 'factory_girl_rails'
  gem 'cucumber'
end

gem "devise", :git => "git://github.com/plataformatec/devise.git"
gem 'cancan'
gem 'redgreen'
gem 'formtastic', :git => "git://github.com/justinfrench/
formtastic.git", :branch => "rails3"
gem 'mail'

After installing all the gems and running rspec ./spec/controllers/
some_file.rb I get the following error:

http://gist.github.com/446668

Running any other rake task gave me the same error. I tried removing
the ruby 1.9.2-head and installing it again, creating a new gemset and
running bundle install, but I got the same error.

When running rake on ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-
darwin10.0], the default version with Snow Leopard on a Rails 2.3.5
project I don't get any error. Any idea how I can solve this? Thanks.

i think, its bad idea, to use head version of 1.9.2 ruby, to development, and of cource for production too)
use stable ree, and nothing now, because 1.9 is not ready for rails, yet
Ivan Nastyukhin
dieinzige@me.com

Thanks Ivan, but how is it possible that if this is a problem with
that specific ruby version that no one else is having this same
issues, when as it seems, it's the most used version for rails 3
development? I mean, I've been reading all over the internet that
people uses rvm with ruby 1.9.2-head and rails 3.0.0.beta.X, so why I
am the only one having this error? It seems like there is something
wrong with my setup...

Thanks.

when u use head version, u cant be sure, thats your version is the same as all people in blogs)
and of course, u can use some gem or plugin, witch incorrect with 1.9 head)

Ivan Nastyukhin
dieinzige@me.com

Thanks Ivan for the advice. I installed ruby 1.9.1 as it seems to be
the latest stable version, and now everything seems to work again. Do
you know where I can post that failure in order to let ruby developers
know about it?

Thanks.

u can not do it on github.com/ruby ) but it dev version) and your program can crash =)
and core-ruby developers, simlify ignore bugs with : Hi my rails app core-crash at latest ruby,=)

Ivan Nastyukhin
dieinzige@me.com

José Valim (member of Rails Core dev team) said that Rails 3 doesn’t support ruby 1.9.1 (it makes some segmentation fault errors). Actually, it’s supporting ruby 1.9.2!

Source: http://blog.plataformatec.com.br/2010/04/rails-3-with-rvm-ftw/

According to http://guides.rails.info/getting_started.html Rails 3
requires either Ruby 1.8.7 < p248 or Ruby 1.9.2dev because everything
in between has bugs. That's quite unfortunate seeing that the MRI core
developers haven't released any fixes for the bugs yet, yet Linux
distributions are eager to package the latest version (p249).

We've backported the bug fixes that affect Rails 3 to p249 and
included these in the latest REE release, 2010.02. I think the
documentation should be updated with this fact.

Ivan Nastyukhin
dieinzige@me.com

Thanks Fernando. So, seems that I'm stuck with this again... Any
advice on what I can do to setup a configuration as stable as
possible, so I can be able to work with rails 3 ?

I installed ruby 1.9.2-head again with a new gemset and I'm having the
same segmentation errors again.

Hello Daniel,

ruby-1.9.2-head is not a snapshot, it is actively being developed on. So if you download ruby-1.9.2-head Today it may be quite different from what you downloaded with rvm originally. There have also been preview releases of Ruby 1.9.2 (the latest being preview3, if I am not mistaken) which are snapshots... I don't know if any of those work well with Rails 3 though.

1.8.7-p299 has come out recently, I have not tried that yet (has anyone?). I know that 1.8.7-p248 and 1.8.7-p249 don't work (segfaults when you try to access a controller via your browser).

I have been able to work with Rails 3 without problems using Ruby 1.8.7-p174

I hope this helps :slight_smile:

Regards,
Mark