What Gives? If Rails is so good why is it so hard to install it?

286 views
Skip to first unread message

Dan Boyle

unread,
Dec 25, 2013, 5:43:20 PM12/25/13
to rubyonra...@googlegroups.com
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.

Dan

 


Frederick Cheung

unread,
Dec 26, 2013, 1:14:26 AM12/26/13
to rubyonra...@googlegroups.com
On Wednesday, December 25, 2013 10:43:20 PM UTC, Dan Boyle wrote:

> 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? 
>

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.

Fred

> Dan

Jordon Bedwell

unread,
Dec 26, 2013, 4:25:55 AM12/26/13
to rubyonra...@googlegroups.com
On Wed, Dec 25, 2013 at 4:43 PM, Dan Boyle <dan.bo...@gmail.com> wrote:
> 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.

rbenv global 2.1.0

mike

unread,
Dec 26, 2013, 12:30:42 PM12/26/13
to rubyonra...@googlegroups.com
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.  

Ed Drain

unread,
Dec 28, 2013, 11:42:16 PM12/28/13
to rubyonra...@googlegroups.com


On Wednesday, December 25, 2013 5:43:20 PM UTC-5, Dan Boyle wrote:

Scott Eisenberg

unread,
Dec 29, 2013, 12:02:03 AM12/29/13
to rubyonra...@googlegroups.com
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).

What version of Ubuntu are you working with?


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6b6b5791-b887-4ed5-a9a8-dc732e3f2d97%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Scott Eisenberg

unread,
Dec 29, 2013, 12:06:26 AM12/29/13
to rubyonra...@googlegroups.com
Let me re-phrase that, Parallels is downloading 13.04 desktop so let’s work with that version, shall we?

Scott Eisenberg

unread,
Dec 29, 2013, 12:44:04 AM12/29/13
to rubyonra...@googlegroups.com
More:  followed http://gorails.com/setup/ubuntu/13.10 (using the choice of rvm)

Worked like charm.  As they say, do that!

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



Dheeraj Kumar

unread,
Dec 29, 2013, 12:56:37 AM12/29/13
to rubyonra...@googlegroups.com
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.


I've used it > 100 times, and it has never given me a problem.

-- 
Dheeraj Kumar

pouy...@gmail.com

unread,
Dec 31, 2013, 1:38:45 AM12/31/13
to rubyonra...@googlegroups.com
I have put together a blog post on exactly the same topic: http://bit.ly/1hbbBqj

hope it helps.
Reply all
Reply to author
Forward
0 new messages