0

I am learning ruby at the moment (well, i am just getting started) and I am about to do this tutorial: http://guides.rubyonrails.org/getting_started.html

I've installed everything, but when at 3.1 I am asked to execute

bin/rails --version

I get the following response in my terminal:

-bash: bin/rails: No such file or directory

I have googled this problem and found a few answers related to heroku (e.g. this: Heroku App Crash H10 - bash: bin/rails: No such file or directory) and ruby, but I do not have heroku installed here so those answers dont get me anywhere!

I have also tried

rake rails:update:bin

because one user suggested this, but only get back

rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

(See full trace by running task with --trace)

What am I to do now? Is my journey with ruby over already? :(

I have the following versions installed:

ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin11.0]

Rails 4.1.4

Community
  • 1
  • 1
Dominic L.
  • 65
  • 1
  • 5
  • it kind of sounds like you aren't in the correct place in your terminal? did you cd into your rails app? what is the output in the terminal when you type ls? – user3334690 Aug 19 '14 at 17:47
  • possible duplicate of ["bin/rails: No such file or directory" w/ Ruby 2 & Rails 4 on Heroku](http://stackoverflow.com/questions/17583439/bin-rails-no-such-file-or-directory-w-ruby-2-rails-4-on-heroku) – Brad Werth Aug 24 '14 at 02:56

2 Answers2

3

You have to be in app folder. Do cd *app_name*

Andrey Deineko
  • 51,333
  • 10
  • 112
  • 145
1

That looks like an error in the Guide. Try omitting the bin/ prefix when calling the rails binary, it should be in your $PATH when you have the rails gem installed:

rails --version
eik3
  • 115
  • 6