I have spent hours trying to get some version of Rails installed and all to no avail. It seems there are many people who get the same errors but nobody seems to have any answers.
I am new to both Rails and Ubuntu. This is where I am trying to set it up.
Most recently I went to rubyonrails.org and it suggests to use Rails 4.0 and Ruby 2.1 and to use rbenv to install rather than RVM.
It says it installed it but then it doesn’t work.
When I type: ruby -v
I get…
rbenv: ruby: command not found
The `ruby’ command exists in these Ruby versions:
2.1.0
What is this telling me? It says it isn’t found and that it does exist. Huh?
Why is this so difficult? Any insights to help me get my head around all of this would be most welcomed.
The `ruby' command exists in these Ruby versions:
2.1.0
What is this telling me? It says it isn't found and that it does exist. Huh?
Have you set 2.1.0 as the ruby version you want to use (see the "Choosing the ruby version" section of the readme (or run rbenv global version-to-use)
Why is this so difficult? Any insights to help me get my head around all of this would be most welcomed.
It's difficult for non newcomers to remember what obvious things were non obvious, equally it is hard as a newcomer to know what information is relevant or not.
I have spent hours trying to get some version of Rails installed and all to
no avail. It seems there are many people who get the same errors but nobody
seems to have any answers.
I am new to both Rails and Ubuntu. This is where I am trying to set it up.
Most recently I went to rubyonrails.org and it suggests to use Rails 4.0 and
Ruby 2.1 and to use rbenv to install rather than RVM.
One of the reasons this becomes difficult, particularly when responding on a board like this, is that things change quickly. You are talking about multiple operating systems, multiple versions of ruby, multiple versions of rails, multiple tools for managing them. I still see questions on Rails 2 and, quite frankly, that was so long ago I don’t remember. On top of that, you will be faced with choices such as rbenv vs. RVM, ERB templates vs. HAML, etc. and everyone has their arguments as to which is better.
My advice to someone starting out is not to use the standard rails docs. The edge guides are very well written but, to me, they are more of a reference. I would start with a good tutorial. Be default, the tutorial will make these choices for you, but will give you detailed instructions on installing and using them. For example, www.railstutorial.org is one that is commonly recommended (and I recommend it as well). That particular tutorial uses RVM, ERB, and Rspec. Once you have a basic understanding, you can then explore the other options and determine which are best for you.
I have spent hours trying to get some version of Rails installed and all to no avail. It seems there are many people who get the same errors but nobody seems to have any answers.
I am new to both Rails and Ubuntu. This is where I am trying to set it up.
Most recently I went to rubyonrails.org and it suggests to use Rails 4.0 and Ruby 2.1 and to use rbenv to install rather than RVM.
It says it installed it but then it doesn’t work.
When I type: ruby -v
I get…
rbenv: ruby: command not found
The `ruby’ command exists in these Ruby versions:
2.1.0
What is this telling me? It says it isn’t found and that it does exist. Huh?
Why is this so difficult? Any insights to help me get my head around all of this would be most welcomed.
I’m on Macs and I found it pretty easy to set up. I remember in the beginning some version hell with the various Gems but that seems to have settled down for me.
Maybe I can install a Ubuntu on Parallels on the Mac and see if we can guide you through this (assuming I can get it to work on Ubuntu).
Note: Don’t install apt-get ruby or apt-get rails as they will get you older versions. The rails version is 2.3 which is REALLY old. Follow the guide.
Then make an app. Do: rails new test1
It will create an app and then run bundle install. This came back with an error telling me I had to install a certain gem. Do what it says and install it (it gives the command line) and then bundle install again. Had to do this about 3 times.
Finally when you get a clean bundle, run: rails s to start a server. Point the browser to http://0.0.0.0:3000 and see it’s working
And as you can see from my previous post’s timestamp, this only took about 40 minutes to go from nothing to (i) completely new install of Ubuntu to (ii) ruby/rails installed with (iii) a basic app
I use a script called RailsReady, which sets up a fresh OSX/Ubuntu/CentOS installation with Homebrew, RVM, Ruby, all supporting libraries, Bundler, Passenger, Rails, Git.