Help with Redmine installation on Ubuntu 14.04

Hello and thanks in advance for your help.

I am trying to install redmine on an ubuntu server. I am on the step where I am trying to call:

bundler update

And it errors out on installing rmagick. When I try:

sudo gem install rmagick

I get Error installing rmagick. Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb

I am not even sure why its using 1.9.1 ruby because when I do ruby -v I get ruby2.2.2p95 etc...

After looking around on line, I found that I need to install imagemagick, so I tried:

apt-get install libmagickwand-dev

and this gives me an error as well:
error: template infile /usr/share/redmine/templates/database.yml.template does not exist
dpkg: error processing package redmine (--configure):
 subprocesses installed post-installation script returned error exit status 1
Errors were encountered while processing: redmine.

I am not sure what I can do at this point, and I am new to Ubuntu and the terminal so I apologize ahead of time.

Any help would be much appreciated.
Thank you.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Zephyr ICTCloud ArchitectCommented:
Did you also install all prerequisites? Something like this:

Sudo apt-get install ImageMagick-devel libMagick++-devel libbz2-devel libbz2-devel libtool 

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dougfosterNYCAuthor Commented:
Well I tried:

sudo apt-get install libmagickwand-dev

Open in new window

Which seems to be the one thing I need to install rmmagick, but it errors out and gives me:

error: template infile /usr/share/redmine/template/database.yml.template does not exist
dpkg: error processing package redmine (--configure):
  subprocess installed post-instalation script returned error exit status 1

I was previously able to remove the first "template" error by creating a database.yml.template file in that directory, which made the error go away but not sure what affects would happen in the future because the second error still prevents the install it seems like.

Thank you for your reply.
dougfosterNYCAuthor Commented:
I was able to get

sudo apt-get install libmagickwand-dev

Open in new window

Installed by doing:

sudo apt-get remove redmine

Open in new window

first, but I am still getting an error when trying to install rmagick:

sugo gem install rmagick

Open in new window

Gives me:

Error installing rmagick:
ERROR: Failed to build gem native extension

/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby1.9.1/rubygems/custom_require.rb:36:in 'require': cannot load such file -- mkmf (LoadError)
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

Zephyr ICTCloud ArchitectCommented:
Regarding the database error, did you perform steps like these during your installation:

Create the database for redmine:
$ mysql -u root -p
CREATE USER 'redmine'@'localhost' IDENTIFIED BY '<password>';
GRANT ALL privileges ON redmine.* TO 'redmine'@'localhost';

Configure the database settings:
$ cd /usr/share/redmine
$ sudo cp templates/database.yml.template config/database.yml
$ sudo vi config/database.yml

Sample config file using the default MySQL port (3306):
  adapter: mysql
  database: redmine
  host: localhost
  username: redmine
  password: <password>
  encoding: utf8

Open in new window

That might explain the missing of the file?

What about this for rmagick, does this install work?

sudo apt-get install libmagick++-dev

Open in new window

sudo apt-get install libmagickcore-dev libcurl4-dev

Open in new window

Strange problem...
dougfosterNYCAuthor Commented:
sudo apt-get install libmagick++-dev

is installed. I tried:

 sudo apt-get install libmagickcore-dev libcurl4-dev

and it said that  have to explicitly select either libcurl4-openssl-dev, libcurl4-nss-dev, or libcurl4-gnutls-dev. So I installed all 3.

Still getting the error when running:

sudo gem install rmagick

same error - cannot load such file -- mkmf
Zephyr ICTCloud ArchitectCommented:
Maybe ruby requires dev?

"sudo apt-get install ruby-dev"
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.