I'm a total beginner with the terminal and I wanted to learn Rails. I have a mac with Lion 10.7.5 on it. I wanted to install Rails and it seems to be installed and then when i typed rails -v i got this message :
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
So I went to stack overflow and saw lots of people having the same problem. So I tried the things people recommended and none of them worked. Then I took the not that smart decision to delete the ruby2.1.1 in order to reinstall it with :
brew install ruby
And here start the mess :
Warning: You seem to have osx-gcc-installer installed.
Homebrew doesn't support osx-gcc-installer. It causes many builds to fail and
is an unlicensed distribution of really old Xcode files.
Please install the CLT or Xcode 4.6.3.
I already have Xcode 4.6.3
Warning: It appears you have MacPorts or Fink installed.
Not sure what to do about it
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
Warning: ruby-2.1.1 already installed
So I typed in : rvm use ruby 2.1.1
And I got :
Warning! PATH is not properly set up, '/Users/me/.rvm/gems/ruby-2.1.1/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.1.1'.
ruby-2.1.1 is not installed.
To install do: 'rvm install ruby-2.1.1'
so I did it and I got :
Downloaded archive checksum did not match, archive was removed!
If you wish to continue with not matching download add '--verify-downloads 2' after the command.
Downloading https://rvm.io/binaries/osx/10.7/x86_64/ruby-2.1.1.tar.bz2 failed.
and
Error running 'env LDFLAGS=-L/opt/sm/pkg/active/lib CFLAGS=-O3 -
I/opt/sm/pkg/active/include CPATH=/opt/sm/pkg/active/include ./configure --
prefix=/Users/me/.rvm/rubies/ruby-2.1.1 --disable-install-doc --enable-shared',
showing last 15 lines of /Users/me/.rvm/log/1397387601_ruby-2.1.1/configure.log
Thank you if you can help I don't know what to do know
Ps : Other test: ruby -v I got
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0]
rvm list
Warning! PATH is not properly set up, '/Users/me/.rvm/gems/ruby-2.1.1/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.1.1'.
rvm use ruby-2.1.1
ruby-2.1.1 is not installed.
echo $PATH
/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/Users/me/.rvm/gems/ruby-2.1.1/bin:/Users/me/.rvm/gems/ruby-2.1.1@global/bin:/Users/me/.rvm/rubies/ruby-2.1.1/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin:/Users/me/.rvm/bin:/Users/me/.rvm/bin:/Users/me/.rvm/bin
which ruby
/usr/bin/ruby
rvm uninstall ruby-2.1.1
Warning! PATH is not properly set up, '/Users/me/.rvm/gems/ruby-2.1.1/bin' is not at first place,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.1.1'.
ruby-2.1.1 - #removing src/ruby-2.1.1..
ruby-2.1.1 - #removing default ruby interpreter............
and my .bash_profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Load RVM into a shell session *as a function*
PATH=$PATH:$HOME/.rvm/bin source "$HOME/.rvm/scripts/rvm"
and finally my .bashrc
export PATH="/usr/local/heroku/bin:$PATH"
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
source "$HOME/.rvm/scripts/rvm