Project

General

Profile

Ubuntu 12.04 -> 14.04 - redmine don't start, trouble with fcgi ?

Added by Emmanuel DUMAS almost 10 years ago

Hello

I want to be a simple user of redmine with postgresql DB. Until now, I using redmine under Ubuntu 12.04 without trouble.
I have upgrade my server from ubuntu 12.04 -> 14.04. After this upgrade, redmine don't restart.
So I have read various message to understand what happends. I have manually modify many file, I have try to reinstall from apt-get install redmine etc.

Now, I don't succes to fix this trouble: when I start redmine : http://myserver/redmine, I have this message :

It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:

bundle install
If that didn't work, then the problem is probably caused by your application being run under a different environment than it's supposed to. Please check the following:

Is this app supposed to be run as the www-data user?
Is this app being run on the correct Ruby interpreter? Below you will see which Ruby interpreter Phusion Passenger attempted to use.
-------- The exception is as follows: -------

Could not find gem 'fcgi (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
  /var/lib/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/resolver.rb:352:in `resolve'
  /var/lib/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/resolver.rb:165:in `start'
  /var/lib/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/resolver.rb:129:in `resolve'
  /var/lib/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/definition.rb:203:in `resolve'
  /var/lib/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/definition.rb:133:in `specs'
  /var/lib/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/definition.rb:178:in `specs_for'
  /var/lib/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/definition.rb:167:in `requested_specs'
  /var/lib/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/environment.rb:18:in `requested_specs'
  /var/lib/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/runtime.rb:13:in `setup'
  /var/lib/gems/1.9.1/gems/bundler-1.6.2/lib/bundler.rb:120:in `setup'
  /var/lib/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/setup.rb:17:in `<top (required)>'
  /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
  /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
  /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:245:in `block in run_load_path_setup_code'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:348:in `running_bundler'
  /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:243:in `run_load_path_setup_code'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `<main>'
Application root
/usr/share/redmine
...

So I have search what is recommanded about bundle install.

I have run manually this :

edumas@xxx:/usr/share/redmine$ sudo bundle install --without development test
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all
non-root users on this machine.
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb 
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from extconf.rb:1:in `<main>'

Gem files will remain installed in /var/lib/gems/1.9.1/gems/fcgi-0.9.2.1 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/fcgi-0.9.2.1/ext/fcgi/gem_make.out
An error occurred while installing fcgi (0.9.2.1), and Bundler cannot continue.
Make sure that `gem install fcgi -v '0.9.2.1'` succeeds before bundling.
edumas@xxx:/usr/share/redmine$

I have check :

dpkg -l "ruby*" 
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom                                         Version                    Architecture               Description
+++-===========================================-==========================-==========================-============================================================================================
ii  ruby                                        1:1.9.3.4                  all                        Interpreter of object-oriented scripting language Ruby (default version)
...
ii  ruby-fcgi                                   0.9.2.1-1                  amd64                      FastCGI library for Ruby
...

I try also :

 sudo gem install fcgi -v '0.9.2.1'
Building native extensions.  This could take a while...
ERROR:  Error installing fcgi:
    ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
    from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from extconf.rb:1:in `<main>'

Gem files will remain installed in /var/lib/gems/1.9.1/gems/fcgi-0.9.2.1 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/fcgi-0.9.2.1/ext/fcgi/gem_make.out

And now, I really need help. What I am suppose to do ?

Best regard
Emmanuel


Replies (2)

RE: Ubuntu 12.04 -> 14.04 - redmine don't start, trouble with fcgi ? - Added by Martin Denizet (redmine.org team member) almost 10 years ago

Hello Emmanuel,

Try:

sudo apt-get install ruby1.9.1-dev

Then run the bundler again.

To mention it, I've a blog article about Redmine on Ubuntu 14.04 but using RVM and not the distro packages like you did.

Cheers.

RE: Ubuntu 12.04 -> 14.04 - redmine don't start, trouble with fcgi ? - Added by Emmanuel DUMAS almost 10 years ago

Hello

Thank you, now it's run.

To be exact, I have do :

sudo apt-get install ruby-dev libfcgi libfcgi-dev
sudo gem install fcgi -v '0.9.2.1'
sudo bundle install --without development test

And now it's run.

Best regard
Emmanuel

    (1-2/2)