Ruby Ruby on Rails 5 Basics Creating an App Our First Resource

Ali Iftakhar
Ali Iftakhar
729 Points

Windows 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
Ari Misha
19,252 Points

Hiya 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 


ruby bin/bundle install [gemName]

I hope it helped. (: