Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Build a Simple Ruby on Rails Application Getting Started with Rails Generate a Rails Application

Charutha Bandara
Charutha Bandara
5,958 Points

Cannt create new rails application

I am having trouble creating the treebook rails app. I am trying to put it in a folder inside of my Documents: (Documents/Development/Ruby).

Charuthas-MacBook-Pro:Ruby charuthabandara$ rvm use 2.1.5
Using /Users/charuthabandara/.rvm/gems/ruby-2.1.5
Charuthas-MacBook-Pro:Ruby charuthabandara$ rails new treebook
/Users/charuthabandara/.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'railties' (>= 0) among 14 total gem(s) (Gem::LoadError)
    from /Users/charuthabandara/.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/dependency.rb:309:in `to_spec'
    from /Users/charuthabandara/.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in `gem'
    from /Users/charuthabandara/.rbenv/versions/2.1.5/bin/rails:22:in `<main>'
Charuthas-MacBook-Pro:Ruby charuthabandara$ 

1 Answer

Hmmm it seems you lack a gem that is needed try to run

gem install railties

If you still have troubles after that I suggest you re-install rails, if that doesn't work let us know.

(It's pretty late on my side so i'll take some hours to reply since I am heading to sleep but others might help before I do if this does not work)

Charutha Bandara
Charutha Bandara
5,958 Points

Thanks Gloria,

I reinstalled rails and everything worked.

Awesome!