Completely broken rails install on OSX

Hi

I am new to rails and I was trying to get version 2.1.1 installed so
that I could run lovdbyless and play with Rails to see what it was
like. When trying to install lovdbyless I kept getting problems when
running “rake” so I looked around for an answer and did what the
forums said, and then i’d get another error and i’d go through the
same process. Now I am getting very strange errors that I can’t find
anyone else having so I really need some help!

I am on OSX 10.6.6.

Here’s what happens:

$ rails -v
-bash: /opt/local/bin/rails: /opt/local/bin/ruby: bad interpreter: No
such file or directory

$ ruby -v
-bash: ruby: command not found

$ sudo port install ruby
—> Computing dependencies for ruby
—> Cleaning ruby

$ sudo port install rails
Error: Port rails not found

I am totally lost, so any help, even if it’s just some instructions on
deleting everything and starting again, would be very helpful.

Thanks so much!
Ben

Hi, Ben,
Try RVM http://rvm.beginrescueend.com
Almost everyone uses it.

Andrei

I used this and worked like a charm:

shell and bash are the same thing

i tried rvm but had a couple of problems in mac since rvm is more linux
oriented

and if u want to use the 1.8.7 its already installed in mac 10.6

Thanks Andrei

I had already installed RMV. I tried again and it seemed to install
fine but now i get:

$ rvm list known
-bash: rvm: command not found
$ rvm install ruby-1.8.7-p160
-bash: rvm: command not found

I must be doing something stupid i know, but not sure what it is! (is
it something to do with the difference between shell and bash?)

Thanks for your help
Ben

I wonder if you added the required line to your .bash_profile file.

This is the line…

[[ -s “$HOME/.rvm/scripts/rvm” ]] && . “$HOME/.rvm/scripts/rvm” #
This loads RVM into a shell session.

Check out the link on the rvm site… and scroll down to the “Post
Install” section.

http://rvm.beginrescueend.com/rvm/install/

David

Johnny Mejias wrote in post #982828:

i tried rvm but had a couple of problems in mac since rvm is more linux
oriented

What do you mean rvm is more linux oriented. I know a lot of people that
use rvm just fine on Mac OS X. In fact it’s been working great on the
Mac for me.

On Feb 20, 10:02pm, deadnuker [email protected] wrote:

shell and bash are the same thing

i tried rvm but had a couple of problems in mac since rvm is more linux
oriented

I’ve got rvm running fine on mac 10.6.6

On Feb 21, 5:57pm, dkerins [email protected] wrote:

I wonder if you added the required line to your .bash_profile file.

This is the line…

[[ -s “$HOME/.rvm/scripts/rvm” ]] && . “$HOME/.rvm/scripts/rvm” #
This loads RVM into a shell session.

This is correct. Although you may not have a .bash_profile file on
your mac, so add it to your home folder, with the line above added.

bash will then load rvm at startup and you should be able to use it
fine and be on your way. Remember to close your shell window
afterwards and restart it so that rvm gets loaded, or open a new
shell.

On Feb 19, 9:22am, scruffian [email protected] wrote:

I am on OSX 10.6.6.
$ sudo port install ruby
—> Computing dependencies for ruby
—> Cleaning ruby

$ sudo port install rails
Error: Port rails not found

You don’t install rails that way. Rails and it’s accompanying files
are installed as ruby gems.

You should already have ruby 1.8.7 with mac 10.6.6 (as already
mentioned), so if you are just experimenting at the moment to see if
rails is something you want to work with (in which case rvm might be
overkill initially), just open a shell and enter:

gem install rails VERSION=2.1.1

at the command prompt, and this will give you the rails version you
need to get started.

If you want the latest version 3.0.4, just omit VERSION=*

However, I doubt you will get very far with setting up lovdbyless.
I’ve just downloaded it and had a quick look. I think you are going to
need, at the very least, a basic understanding of ruby and rails in
order to get it functioning locally.

I also would not recommend it as a way of learning rails. It appears
that lovedbyless is stuck way back on rails 2.1.1, and it has not been
updated since 2008. Their big claim that it now runs on rails 2.2.2 is
not that impressive. Rails is now at 3.0.4, so you may be better
learning rails 3 right off the bat.

There are two good books which every newb should have:

AWDwR [1] (v4 is still in Beta but you can get the electronic version
for $24 - along with all the updates released prior to printing -
also, even after the paper book is released, you will still receive
updates to your e-version when they are available)

Follow the tutorials in this to get an understanding of how everything
fits together. It will also give you a basic intro to the ruby
language.

Programming Ruby [2] (commonly known as the Pickaxe book) is also
recommended if you want to increase your ruby knowledge further than
AWDwR provides for.

Also checkout Railscasts [3] - they provide free instructional vids on
all sorts of rails related topics.

[1] http://pragprog.com/titles/rails4/agile-web-development-with-rails
[2] http://pragprog.com/titles/ruby3/programming-ruby-1-9
[3] http://railscasts.com/

We’ve all been newbs at one time or another, so good luck with it.

Paul

On Feb 24, 2:13pm, paul h [email protected] wrote:

like. When trying to install lovdbyless I kept getting problems when
-bash: /opt/local/bin/rails: /opt/local/bin/ruby: bad interpreter: No
Error: Port rails not found

You don’t install rails that way. Rails and it’s accompanying files
are installed as ruby gems.

You should already have ruby 1.8.7 with mac 10.6.6 (as already
mentioned), so if you are just experimenting at the moment to see if
rails is something you want to work with (in which case rvm might be
overkill initially), just open a shell and enter:

gem install rails VERSION=2.1.1

should be:

gem install rails --version 2.1.1

sorry for the wrong info

Hi,

Try using RVM at (http://rvm.beginrescueend.com/)
rvm install 1.9.2 or rvm install jruby

More simple!