- - - - -

Installing Redmine - RoR help needed


  • Please log in to reply
5 replies to this topic

#1 mat8iou

mat8iou

    Small Orange

  • Members
  • PipPip
  • 15 posts

Posted 01 May 2012 - 04:51 AM

I'm trying to install Redmine ( www.redmine.org ).

I've had a fair amount of experience installing PHP based web apps, but is my first time doing anything using Ruby on Rails - so its been a bit of a learning experience.

Anyway - I've done the first bits of the setup & got them to work - with a bit of tweaking.

However, following the install instructions, I eventually end up with an error message. I can replicate it by typing the command directly:
gem install mysql2

This gives the following output:

Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/local/lib/ruby/include/ruby.h
Gem files will remain installed in /home/myusername/ruby/gems/gems/mysql2-0.3.11 for inspection.
Results logged to /home/myusername/ruby/gems/gems/mysql2-0.3.11/ext/mysql2/gem_make.out

If I go to the file gem_make.out, it contains a section of the same info as listed above:

/usr/local/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/local/lib/ruby/include/ruby.h

Now, as I mentioned, my  only real knowledge of RoR is what I picked up trying to install this app yesterday.

Does anyone know what this message means? Is there something else I need to type first to stop getting this error message?

I had a quick look in the /usr/local/lib/ruby/include/ directory for ruby.h, but sould not locate it there, or for that matter in any of the subdirectories of /usr/local/lib/ruby/

Thanks in advance for any suggestions.

#2 IBBoard

IBBoard

    Massive Orange

  • Volunteer Moderators
  • PipPipPipPipPipPipPip
  • 4,739 posts

Posted 02 May 2012 - 01:33 PM

I'd submit a ticket to the Techs. Linux normally has "...-devel" packages that include header files for when you're building code (after all, why put the headers to build against if you're an end-user who is never going to build code?). If it is looking for a header (a .h file) in that folder and it isn't there then either a) a "-devel" package (or equivalent) is required or b) the build was made into /usr/local but the headers were either not included or put somewhere else and you need a different path.
The more information you provide, the better answer the community can give.

*** Sign up at ASO  with a 15% discount (coupon: saveme15%) or $5 discount (coupon: saveme$5) ***
(Valid on shared hosting and VPS)

#3 mat8iou

mat8iou

    Small Orange

  • Members
  • PipPip
  • 15 posts

Posted 25 May 2012 - 11:04 AM

Thanks for this information - very helpful.

I'll contact the & see whether that option fixes it.

#4 mat8iou

mat8iou

    Small Orange

  • Members
  • PipPip
  • 15 posts

Posted 30 May 2012 - 12:03 PM

Thanks again for the suggestion - the techs installed most of the required Gems, that need to be done as root.

I've now come to a different problem though.

If I go to the page for the web app, I see an error page, saying:

---
Error message:
    Redmine requires Bundler 1.0.21 (you're using 1.0.17). Please install a newer version with `gem install bundler`.
---

This doesn't entirely make sense to me, as there is already a newer version of bundler installed than it requires.

If in a SSH session I type:  gem list --local | grep bundler
It gives the response: bundler (1.1.3)

So - where is it detecting this incorrect version from? And is there any way to make it notice the same version that shows when I log into shell?

If I try to reinstall bundler, it adds the 1.1.4 version - but the web app seems to not detect this.

Any thoughts on why this is happening, or suggestions from those with more experience of Ruby of how to get around this would be welcomed.

#5 mat8iou

mat8iou

    Small Orange

  • Members
  • PipPip
  • 15 posts

Posted 31 May 2012 - 08:47 AM

Solved the problem now - adding:
SetEnv GEM_PATH /home/mat8iou/ruby/gems:/usr/local/lib/ruby/gems/1.9.1
SetEnv GEM_HOME /home/mat8iou/ruby/gems

to the .htaccess file seemed to fix things.

#6 mat8iou

mat8iou

    Small Orange

  • Members
  • PipPip
  • 15 posts

Posted 31 May 2012 - 09:38 AM

In case its of interest to anyone in future, I've wrote about my install experiences with Redmine here:
http://www.mtaylor.co.uk/node/8

ASO staff were really helpful in assisting me with setting it up, but it still felt like an uphill struggle compared to many other web apps such as Wordpress, Drupal etc that I have installed before.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users