Project

General

Profile

Failed Install - After initial install with rmagick failed, I dug myself a deeper hole

Added by Merlin Acious almost 10 years ago

Newbie here [it will be obvious as you go through this story too]
My installation that I am dealing with:

- Ruby implementation and version: ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
- Rails version                  : Rails 3.2.19
- Operating system               : Debian GNU/Linux 6.0.6 (squeeze)
- Database used, and its version : MySQL Server version: 5.1.56
- Ruby-aware server used         : Don't understand, so I'm guessing Webrick

Background
All was going well as per the installation steps.
I got to Step 4. I did not know if my host had rmagick installed so I first went ahead with a Regular Install using

bundle install --without development test

After this I got the following error message

Can't install RMagick 0.0.0. Can't find MagickWand.h.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/ruby1.8
Gem files will remain installed in /home/<user>/.gems/gems/rmagick-2.13.3 for ins                                                                                       pection.
Results logged to /home/<user>/.gems/gems/rmagick-2.13.3/ext/RMagick/gem_make.out
An error occurred while installing rmagick (2.13.3), and Bundler cannot
continue.
Make sure that `gem install rmagick -v '2.13.3'` succeeds before bundling.

I then tried to run an install without rmagick
bundle install --without development test rmagick

But that didn't work either.

So being the newbie that I am, I thought that if I delete all the files inside the

/home/<user>/.gems/gems
/home/<user>/.gems/bin

folders and re-run the installer without rmagick, it would all be okay.

It was not okay.

The installer didn't do much as I didn't see the gems folder get populated with anything.
So instead I got the list of gems and created a bash file to install all of them manually.

After which I executed Step 5 which went okay.
While executing Step 6, I ran into this error.

$ RAILS_ENV=production rake db:migrate
rake aborted!
no such file to load -- awesome_nested_set/version
/home/<user>/.gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/<user>/.gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/<user>/.gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/<user>/.gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/<user>/domain.com/redmine-2.5.2/config/initializers/10-patches.rb:230
/home/<user>/.gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `load'
/home/<user>/.gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `load'
/home/<user>/.gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/<user>/.gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:245:in `load'
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/engine.rb:593
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/engine.rb:592:in `each'
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/engine.rb:592
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `instance_exec'
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/initializable.rb:30:in `run'
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/initializable.rb:55:in `run_initializers'
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `each'
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/initializable.rb:54:in `run_initializers'
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/application.rb:136:in `initialize!'
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:in `send'
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/<user>/domain.com/redmine-2.5.2/config/environment.rb:14
/home/<user>/.gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/<user>/.gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/<user>/.gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/<user>/.gems/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:251:in `require'
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/application.rb:103:in `require_environment!'
/home/<user>/.gems/gems/railties-3.2.19/lib/rails/application.rb:305:in `initialize_tasks'
Tasks: TOP => db:migrate => environment

Question
How can I undo the mistake I made in deleting all the files inside the /gems and /bin folder and go back to the start of the installation? I feel like I have dug myself into a big hole.


Replies (2)

RE: Failed Install - After initial install with rmagick failed, I dug myself a deeper hole - Added by Anonymous almost 10 years ago

No idea how you can repair this (never delete something directly when you think you don't use it any more: rename it, move it elsewhere or do something else to be sure to recover from your action.

Your initial error (installation of rmagick failed) could be due that you linux system is missing the dev-packages. These are additional packages, which include e.g. C-header.files. Installation of gems needs them!

So for rmagick you need kind of apt-get install rmagick-dev (or so), but better search for an installation instruction which provides an all-in-one-dev-dependencies-installation like here: http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_210_on_Debian_Squeeze_with_Apache_Passenger

Cheers

Alex

RE: Failed Install - After initial install with rmagick failed, I dug myself a deeper hole - Added by Jan Niggemann (redmine.org team member) almost 10 years ago

How can I undo the mistake I made in deleting all the files inside the /gems and /bin folder and go back to the start of the installation? I feel like I have dug myself into a big hole.

You can try to rebuild your gems with gem pristine --all...

    (1-2/2)