Rails Server won't start after Ruby upgrade - Segmentation Fault - ruby-on-rails

After upgrading my Ruby to 1.9.3-p429, I tried to start the Rails server. It told me rails was not installed so, I boldly did a 'gem install rails'. Now when I try to start the server, I'm getting this:
andrunix#amp-laptop~/code/madrilla$ rails s
/Users/andrunix/.rvm/gems/ruby-1.9.3-p429/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
Abort trap: 6
I have no idea why that says, "ruby 1.8.7" in that output. Perhaps that's a clue to my problem.
But anyway, super frustrated at this point.
And by the way, this is on OS X.
Help me please!

Try to set the version you've installed as the default for your whole system:
rvm --default use ruby-1.9.3-p429

Related

Ruby on Rails Console Seg Faults

I have been going through a Ruby on Rails tutorial and have been succeeding up until this point. I simply try to run the rails console:
rails console
and I get this message:
/home/george/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.6.0/lib/nokogiri/nokogiri.so: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]
Obviously, I have tried other solutions on StackOverflow, including
sqlite3_native.so: [BUG] Segmentation fault
and Rails s return: [BUG] Segmentation fault
and have tried the various solutions, such as completely reinstalling the bundles and gems, and removing and reinstalling different versions of sqlite3, none of which have had any effect.
I'm just looking for suggestions or things I'm missing as a newbie to both Ruby and Rails.
[Edit/Solution] Sometimes I worry about my own intelligence. All of my problems were solved by using RVM to switch to 1.9.3-p448 and setting this is as default.
The first thing that jumps out at me is it is trying to load a Ruby 1.9.3 version of the nokogiri library in a Ruby 1.8.7 environment. This would most likely be compiled against all sorts of things that conflict with Ruby 1.8.7 (different versions of libxml2, etc). If I were you, I would nuke 1.8.7 from your machine entirely, and focus on getting a totally sane RVM environment running 1.9.3, since it seems that is what you are actually trying to accomplish anyways.
This probably has to do with the GEM_LOAD_PATH conflicting between the 2 different versions of ruby. Nuking one or the other is probably your best bet.

Rails issue starting server on Mountain Lion "[BUG] Segmentation fault ruby 1.8.7 (2012-02-08 patchlevel 358..."

I'm really new to coding so please pardon my inexperience.
I'm following Michael Hartl's tutorial, and I'm stuck on the part where you're supposed to make a server.
The instruction is to simply type:
$ rails server
The error message I'm getting is:
/Users/name/.rvm/gems/ruby-1.9.3-p429/gems/sqlite3-1.3.5/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
I'm confused as to why it says ruby 1.8.7 even though i'm using 1.9.3. Please help me fix this problem. I'm a complete beginner so please keep it simple.
you probably didn't bundle your gem before running your server. Try
bundle install
then run rails s

Sqlite3 problem with RVM

I had a project with rails 3 and ruby 1.8.7 then I installed rvm and ruby 1.9.2 now when I try to run script/rails console in the project folder, I get this error with SQLlite
/home/khaled/.rvm/gems/ruby-1.9.2-p290/gems/sqlite3-1.3.3/lib/sqlite3/sqlite3_native.so: [BUG] Segmentation fault
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-linux]Aborted
Help ??
First off, If you are using Rails 3 it's rails console, rails server, not script/console, script/server
Second, see if rvm is working properly with rvm in you console. If you get good output then you are ok. If not you need to install rvm properly here.
Switch versions of ruby with rvm use ruby-1.9.3xxxx. You can get the ruby versions with rvm list. Try install different versions and see if that helps out.

Problem with Ruby, Rails, ZSH and RVM

When I go into my rails app folder and write:
which ruby
I get this:
/Users/gugguson/.rvm/rubies/ruby-head/bin/ruby
When I write:
ruby -v
I get this:
ruby 1.9.3dev (2010-09-25 trunk 29341) [x86_64-darwin10.4.0]
Hovever when I run my app with:
rails s
I get an error indication it is using ruby 1.8.7 my app is using:
/Users/gugguson/.rvm/gems/ruby-head/gems/sqlite3-ruby-1.3.1/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
zsh: abort rails s
Do you know what can be causing this?
You might be using system installed rails script, make sure that you use rails installed inside rvm and
head $(which rails)
starts with
#!/Users/gugguson/.rvm/rubies/ruby-head/bin/ruby

Ruby Enterprise Edition crashes in gc_sweep

My Rails application crashes intermittently with the following message:
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/multibyte/utils.rb:52: [BUG] gc_sweep(): unknown data type 0x0(0xbdc2ca0)
ruby 1.8.7 (2009-12-24 patchlevel 248) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2010.01
I am running the app on Nginx / Passenger.
Ruby 1.8.7 Enterprise Edition 2010.10, Rails 2.3.5, Ubuntu 9.10 32bit.
Does anybody have an idea how to fix this?
I had to switch back to Ruby MRI. It is a temporary solution though. Hopefully, this problem will be fixed in the next release of REE.
try opening an issue at:
http://github.com/FooBarWidget/rubyenterpriseedition187-248/issues

Resources