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 trialAli Iftakhar
729 PointsWindows ruby bin\rails Error
I keep getting error when I run the command line. Here's the transcript of it (note: I'm using windows)
ruby bin\rails generate scaffold Post title:string ruby: No such file or directory -- bin/rails (LoadError)
I've tried everything I could but can't make it work. Any advice would be much appreciated.
1 Answer
Ari Misha
19,323 PointsHiya there! i'm a fellow windows user as well for Rails. On windows, Rails could be slight problematic. But first things first, make sure you've Environment Path variable set. Secondly, In order to access rails, you're gonna have to use "Ruby". But i see thats not working as well. But with Rails 5.0, you dont have to use "bin\rails"(thats for Mac/Linux users), you could use "Rails" instead. So yeah try this:
rails generate scaffold Post title:string
One more additional thing i'd wanna point out as well , is whenever you're going to run "bundle install" , its going to throw an error as well. So run this command in order to run "bundle install" or install any gems:
ruby bin/bundle install
or
ruby bin/bundle install [gemName]
I hope it helped. (: