Rails 4 Server Error, Ruby 2.0 Segmentation Error, Trap 6 Interrupt

I just started doing railstutorial.org and get the development environment set up. When I got to section 1.2.5 to start the rails server for fist_app, I type the command and print the following information:

$ rails server /Users/aaronpflower/.rvm/gems/ ruby-2.0.0-p481@railstutorial _rails_4_0/gems/sqlite3- < 1.3.8/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault ruby 2.0.0p481 (2014-05-08 revision 45883) [x86_64-darwin13.2.0] 

Then 500 lines of text follow.

 0 enumerator.so 1 /Users/aaronpflower/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/x86_64-darwin13.2.0/enc/encdb.bundle 2 /Users/aaronpflower/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/x86_64-darwin13.2.0/enc/trans/transdb.bundle 3 /Users/aaronpflower/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/x86_64-darwin13.2.0/rbconfig.rb 4 /Users/aaronpflower/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/compatibility.rb 5 /Users/aaronpflower/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/defaults.rb 6 /Users/aaronpflower/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/deprecate.rb 7 /Users/aaronpflower/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/errors.rb 8 /Users/aaronpflower/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/version.rb 9 /Users/aaronpflower/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/requirement.rb 

What ended with:

 [NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html Abort trap: 6 

This is the first frame that I began to study, so naked with me in my ignorance. When this happened, we double-checked the steps leading to this in the textbook, since it was a beginner who was a high opportunity. I typed the following commands and all the checks. (I also use OS 10.9.3)

 $ rails -v Rails 4.0.5 $ ruby -v 2.0.0p481 $ rvm -v 1.25.27 $ brew doctor system ready to brew 

Through a search in some messages, it was suggested to remove sqlite3 and then install it again, but I still got one seg failure message. Not sure about the next step. Any help is much appreciated.

+7
ruby-on-rails-4 osx-mavericks
source share
2 answers

Your Rails -v and Ruby -v are correct for this tutorial.

I also see from the input that your gemfile has a gem 'sqlite3', '1.3.8' in it.

1: Have you contacted?

When was the last time you ran bundle update or bundle install ?

How did you decide to remove sqlite3? Have you used $ gem uninstall sqlite3 ? Try to remove and then reinstall the stone.

2: - What version manager?

Did you use rvm, rbenv or homebrew for installation? Using different version managers for different parts can create communication problems.

3: Have you installed Xcode?

This is taken from http://www.railstutorial.org :


“As a prerequisite, users of OS X may need to install tools for Xcode developers. To avoid a (huge) full installation, I recommend far fewer command-line tools for Xcode.


To install Xcode (my recommendation), find it in the AppStore.

To install command line tools (MHartl recommendation) - https://developer.apple.com/downloads/

4: Do you use `bundle exec`?

Try bundle exec rails c and bundle exec rails s

5: try updating your package directory

If bundle exec does not work Remove the .bundle / directory and reinstall it using

 rm -rf .bundle/ && bundle 
+5
source share

I had the same problem, I just switched to a different version of ruby

eg,

 rvm use 1.9.3-p484 

and then layering again.

+1
source share

All Articles