user1203225
user1203225

Reputation: 23

Accessing localhost server for Rails

I am trying to teach myself ruby on rails and I when I tried to access my server using Terminal on my Mac this is what I got back:

rails server /Library/Ruby/Site/1.8/rubygems/dependency.rb:247:in to_specs': Could not find railties (>= 0) amongst [bundler-1.0.22, rake-0.9.2] (Gem::LoadError) from /Library/Ruby/Site/1.8/rubygems/dependency.rb:256:into_spec' from /Library/Ruby/Site/1.8/rubygems.rb:1208:in `gem' from /usr/bin/rails:18

Any thoughts on this?

Upvotes: 0

Views: 324

Answers (1)

MysteriousFist
MysteriousFist

Reputation: 426

Try typing "bundle exec rails server" to ensure that the proper gems are being loaded.

Also you'll probably want to be using Ruby 1.9.x for new Rails apps. Since you're using OS X I suggest https://github.com/sstephenson/ruby-build to build the latest version of Ruby. You can use it in conjunction with rbenv which will help you manage having two versions of Ruby on the same system.

If you do decide to use rbenv you'll want to type "gem uninstall bundler" and then reinstall it after you install rbenv so that the gem bin is in the right place. As stated above, you'll want to use "bundle exec" before any rails or rake command to make sure the proper environment is loaded.

Upvotes: 1

Related Questions