02 May 2013, 00:17
Generic-user-small

Michael Bianchi (9 posts)

I’m convinced I have damaged my ruby and/or rails to the point that with each chapter I do one of the commands as instructed and get rake failed! and 20 lines of trace back.

How do I blow them both away and reinstall from scratch?

02 May 2013, 02:53
Samr_small_pragsmall

Sam Ruby (584 posts)

Looks like you are using rvm.

Start with rvm implode.

If you have the Rails 4 version of the book, get the latest pushed out today and follow those build instructions.

If not, here is the short form:

sudo rvm requirements --autolibs=enable
rvm install 2.0.0
rvm use 2.0.0
gem install rails --version x.x.x

Feel free to substitute 1.9.3 for 2.0.0.

02 May 2013, 16:08
Generic-user-small

Michael Bianchi (9 posts)

Thanks.

I bought the 3.2 Fourth Edition, not the Beta.

I’m guessing I should install ruby 1.9.3 and rails 3.2.13.

I’m going to uninstall the Fedora 18 packages and follow the rvm path. I’ll report back.

background< : I wasn’t using rvm when I started, but I was thrashing around trying to figure out what to do with the “rake fails!” problems when following the step-by-step instructions.

A problem I had early on was a shared library collision between ruby and chromium-browser (which I must use because Firefox print fails in a way I cannot seem to get around.) I was doing package installs on both and getting collisions.

02 May 2013, 15:53
Generic-user-small

Michael Bianchi (9 posts)

What am I doing wrong?

(somehow this has a time stamp before the detailed message that follows, even though I sent it afterwards.)

02 May 2013, 15:45
Generic-user-small

Michael Bianchi (9 posts)

I did rvm implode and got

    Are you SURE you wish for rvm to implode?
    This will recursively remove /foveal/home/mbianchi/.rvm and other rvm traces?
    (anything other than 'yes' will cancel) > yes
    Removing rvm-shipped binaries (rvm-prompt, rvm, rvm-sudo rvm-shell and
    rvm-auto-ruby)
    Removing rvm wrappers in /foveal/home/mbianchi/.rvm/bin
    Hai! Removing /foveal/home/mbianchi/.rvm
    /foveal/home/mbianchi/.rvm has been removed.

    Note you may need to manually remove /etc/rvmrc and ~/.rvmrc if they exist
    still.
    Please check all .bashrc .bash_profile .profile and .zshrc for RVM source lines
    and delete or comment out if this was a Per-User installation.
    Also make sure to remove `rvm` group if this was a system installation.
    Finally it might help to relogin / restart if you want to have fresh
    environment (like for installing RVM again).

Rebooted.

      rvm
    bash: rvm: command not found

    curl -L https://get.rvm.io | bash -s stable
    ... messages ...


    sudo rvm requirements --autolibs=enable did not work:  sudo: rvm: command not found


    rvm requirements --autolibs=enable
    Installing requirements for fedora, might require sudo password.

    rvm install 1.9.3 worked.

    rvm use     1.9.3
    RVM is not a function, selecting rubies with 'rvm use ...' will not work.

    You need to change your terminal emulator preferences to allow login shell.
    Sometimes it is required to use `/bin/bash --login` as the command.
    Please visit https://rvm.io/integration/gnome-terminal/ for a example.

    /bin/bash --login  rvm use     1.9.3

did not work - same message.

    /bin/bash --login  -c 'rvm use     1.9.3' worked.


    gem install rails --version 3.2.13
    bash: gem: command not found

    ruby
    bash: ruby: command not found

Rebooted. still command not found.

    locate  bin/ruby
    /foveal/home/mbianchi/.rvm/bin/ruby-1.9.3-p392
    /foveal/home/mbianchi/.rvm/bin/ruby-1.9.3-p392@global
    /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392@global/bin/ruby_noexec_wrapper
    /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392@global/bin/rubygems-bundler-uninstaller
    /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392@global/gems/rubygems-bundler-1.1.1/bin/ruby_noexec_wrapper
    /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392@global/gems/rubygems-bundler-1.1.1/bin/rubygems-bundler-uninstaller
    /foveal/home/mbianchi/.rvm/rubies/ruby-1.9.3-p392/bin/ruby

now what?

02 May 2013, 17:07
Generic-user-small

Michael Bianchi (9 posts)

Thrashing around on https://rvm.io/rvm/install/ I’ve managed to install ruby and rails:

      ruby -v
      ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]

      rails -v
      Rails 3.2.13

Now my problem is:

    rails server
    => Booting WEBrick
    => Rails 3.2.13 application starting in development on
    http://0.0.0.0:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    Exiting
    /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in
    `require': cannot load such file -- openssl (LoadError)
    from /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
    from /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.4.5/lib/rack/session/cookie.rb:1:in `<top (required)>'
    from /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require'
    from /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require'
    from /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/actionpack-3.2.13/lib/action_dispatch/middleware/session/cookie_store.rb:4:in `<top (required)>'
    from /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/configuration.rb:140:in `const_get'
    from /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application/configuration.rb:140:in `session_store'
    from /foveal/home/mbianchi/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/application.rb:273:in `block in default_middleware_stack'
    etc ....

Where is lib/active_support/dependencies.rb:251 looking for a file named “openssl” ?

02 May 2013, 17:19
Generic-user-small

Michael Bianchi (9 posts)

Much more thrashing led to:

    rvm autolibs 3

    rvm reinstall all --force

Now the server works:

    rails server
    => Booting WEBrick
    => Rails 3.2.13 application starting in development on http://0.0.0.0:3000
    => Call with -d to detach
    => Ctrl-C to shutdown server
    [2013-05-02 13:20:43] INFO  WEBrick 1.3.1
    [2013-05-02 13:20:43] INFO  ruby 1.9.3 (2013-02-22) [x86_64-linux]
    [2013-05-02 13:20:43] INFO  WEBrick::HTTPServer#start: pid=5877 port=3000

This whole exercise has been far too painful!

02 May 2013, 17:43
Samr_small_pragsmall

Sam Ruby (584 posts)

I haven’t tried Fedora lately, and it is a shame that it is so painful there. But I’m glad that you got through it!

One thing I would suggest is that you follow up with RVM support: https://rvm.io/support/irc/

In particular, I will state that they are very responsive to IRC.

  You must be logged in to comment