rvm install 1.8.7 prompts "There has been an error while running make. Halting the installation."

I want to work with both Rails 2 and Rails 3 projects.

I have RVM installed.

When I upgraded to Rails 3, Installed RVM via terminal:

bash < <( curl http://rvm.beginrescueend.com/releases/ … ll-latest)

version=$(curl http://rvm.beginrescueend.com/releases/ … sion.txt);

mkdir -p ~/.rvm/src/ && cd ~/.rvm/src/ && curl -O
http://rvm.beginrescueend.com/releases/ … on}.tar.gz | tar zxf - && cd
rvm-${version} && ./install

I updated the .bash_profile and added the below line of text:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

Then I type:

rvm install 1.9.2

it did some stuff and then suddenly aborted:

Error running 'make ', please read
/Users/jmerlino/.rvm/log/ruby-1.9.2-p136/make.log
There has been an error while running make. Halting the installation.

Then I did the following:
$ rvm package install readline
$ rvm remove 1.9.2
$ rvm install 1.9.2 --with-readline-dir=$rvm_path/usr

$ cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readline
$ ruby extconf.rb
$ make install

So I finally got Rails 3 working.

Now I want to get Rails 2 working as well. So I follow this link:

http://matthew.mceachen.us/blog/switchi … m-966.html

But when I run:

rvm install 1.8.7

I get:

/Users/jmerlino/.rvm/rubies/ruby-1.8.7-p330, this may take a while
depending on your cpu(s)...

ruby-1.8.7-p330 - #fetching
ruby-1.8.7-p330 - #downloading ruby-1.8.7-p330, this may take a while
depending on your connection...
  % Total % Received % Xferd Average Speed Time Time Time
Current
                                 Dload Upload Total Spent Left
Speed
100 4092k 100 4092k 0 0 100k 0 0:00:40 0:00:40 --:--:--
104k
ruby-1.8.7-p330 - #extracting ruby-1.8.7-p330 to
/Users/jmerlino/.rvm/src/ruby-1.8.7-p330
ruby-1.8.7-p330 - #extracted to /Users/jmerlino/.rvm/src/ruby-1.8.7-p330
ruby-1.8.7-p330 - #configuring
ruby-1.8.7-p330 - #compiling
Error running 'make ', please read
/Users/jmerlino/.rvm/log/ruby-1.8.7-p330/make.log

Thanks for response.

Should I try rvm remove 1.8.7 --with-readline-dir=$rvm_path/usr ?

                                Dload Upload Total Spent Left
Speed
100 4092k 100 4092k 0 0 100k 0 0:00:40 0:00:40 --:--:--
104k
ruby-1.8.7-p330 - #extracting ruby-1.8.7-p330 to
/Users/jmerlino/.rvm/src/ruby-1.8.7-p330
ruby-1.8.7-p330 - #extracted to /Users/jmerlino/.rvm/src/ruby-1.8.7-p330
ruby-1.8.7-p330 - #configuring
ruby-1.8.7-p330 - #compiling
Error running 'make ', please read
/Users/jmerlino/.rvm/log/ruby-1.8.7-p330/make.log

So, what was in it?

Fred

Frederick Cheung wrote in post #980922:

Error running 'make ', please read
/Users/jmerlino/.rvm/log/ruby-1.8.7-p330/make.log

So, what was in it?

Fred

Towards bottom it says this:

readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first
use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1

Frederick Cheung wrote in post #980922:

>> Error running 'make ', please read
>> /Users/jmerlino/.rvm/log/ruby-1.8.7-p330/make.log

> So, what was in it?

> Fred

Towards bottom it says this:

readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first
use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1

Well it's clearly a readline based problem - did you try passing --
with-readline-dir=$rvm_path/usr as you did when building 1.9.2 ?

Fred

Frederick Cheung wrote in post #981180:

readline.c: In function username_completion_proc_call:
readline.c:730: error: username_completion_function undeclared (first
use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1

Well it's clearly a readline based problem - did you try passing --
with-readline-dir=$rvm_path/usr as you did when building 1.9.2 ?

Fred

Yes, that worked.

So now I can switch between rvm versions:

MacBook-Pro:~ jmerlino$ rvm use 1.8.7
Using /Users/jmerlino/.rvm/gems/ruby-1.8.7-p330
MacBook-Pro:~ jmerlino$ rvm use 1.9.2
Using /Users/jmerlino/.rvm/gems/ruby-1.9.2-p136

However, I try to create rails 2 project and got an uninviting error:

MacBook-Pro:~ jmerlino$ rails _2.3.5_ myproject
/Users/jmerlino/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/rubygems.rb:762:in
`report_activate_error': RubyGem version error: rails(3.0.3 not = 2.3.5)
(Gem::LoadError)
    from
/Users/jmerlino/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/rubygems.rb:219:in
`activate'
    from
/Users/jmerlino/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/rubygems.rb:1065:in
`gem'
    from /Users/jmerlino/.rvm/gems/ruby-1.9.2-p136/bin/rails:18:in
`<main>'

Do I need to do something to Rails as well?

Thanks for response.

Frederick Cheung wrote in post #981180:
However, I try to create rails 2 project and got an uninviting error:

MacBook-Pro:~ jmerlino$ rails _2.3.5_ myproject
/Users/jmerlino/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/rubygems.rb:762: in
`report_activate_error': RubyGem version error: rails(3.0.3 not = 2.3.5)

That sounds like you don't have 2.3.5 installed for that ruby. Also
I'm not sure how well rails 2.3.5 works with ruby 1.9

Fred

Frederick Cheung wrote in post #981653:

Frederick Cheung wrote in post #981180:
However, I try to create rails 2 project and got an uninviting error:

MacBook-Pro:~ jmerlino$ rails _2.3.5_ myproject
/Users/jmerlino/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/rubygems.rb:762: in
`report_activate_error': RubyGem version error: rails(3.0.3 not = 2.3.5)

That sounds like you don't have 2.3.5 installed for that ruby. Also
I'm not sure how well rails 2.3.5 works with ruby 1.9

Fred

Even when I switch to ruby 1.8.7, still it says I don't have 2.3.5
installed:

MacBook-Pro:bin jmerlino$ rvm use 1.8.7
Using /Users/jmerlino/.rvm/gems/ruby-1.8.7-p330
MacBook-Pro:bin jmerlino$ rails _2.3.5_ myproject
/Library/Ruby/Site/1.8/rubygems.rb:777:in `report_activate_error': Could
not find RubyGem rails (= 2.3.5) (Gem::LoadError)
  from /Library/Ruby/Site/1.8/rubygems.rb:211:in `activate'
  from /Library/Ruby/Site/1.8/rubygems.rb:1056:in `gem'
  from /usr/bin/rails:19

So here's my confusion. I have both rvm 1.8.7 and 1.9.2. Do I type from
the command line the following:

rvm use 1.8.7
gem install -v=2.3.5 rails

Will it install the rails gem in the right place if I type that above?

Thanks for response.

yup. you need to install the gems for each ruby version you’re using.