Help getting Redmine 4 running on Ubuntu 18.04 with Apache
—I've installed Redmine 4.0.4
—OS is Ubuntu 18.04, on a cloud server
—I also have ISPConfig installed (an Open Source Hosting Control Panel)(so, I'm using Apache and MySQL)
—To my understanding, the installation went fine. I installed the downloaded redmine in a directory I made (/opt/redmine-4/) and installed the necessary packages as well.
On first run, I get "Application error Rails application failed to start properly". I don't know how to resolve this or get past it.
So that you know:
While I'm proficient with Linux, this is the first time I've ever done anything with Ruby.
Where I imagine the problem is:
The dispatch.fcgi file.
I don't understand anything in the file or really what it accomplishes.
I have attached the dispatch.fcgi and .htaccess files, as I wouldn't be surprised if one or both of them need attention beyond what I understand.
root@redmine:/opt/redmine-4/public# ./dispatch.fcgi Traceback (most recent call last): 9: from ./dispatch.fcgi:20:in `<main>' 8: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require' 7: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency' 6: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require' 5: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require' 4: from /var/lib/gems/2.5.0/gems/rack-2.0.7/lib/rack/handler/fastcgi.rb:1:in `<top (required)>' 3: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require' 2: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:in `load_dependency' 1: from /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `block in require' /var/lib/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in `require': cannot load such file -- fcgi (LoadError)
I did this in search of an idea of what's going wrong.
I'm certain someone with more experience in this area will find more meaning in this than I am at the moment.
I will continue to research in order to understand better, but if someone already sees what's wrong and might point me in the right direction, I'd be real grateful of course.
I did this .....
sudo apt install libfcgi-dev
gem install fcgi -v '0.9.2.1' --source 'https://rubygems.org/'
And added to the 'Gemfile' file the following .....
bundle install --without development test
Then I re-ran public/dispatch.fcgi
Things just sat there with no feedback to the terminal so after a few moments I hit CTRL+c, and I got .....
Traceback (most recent call last):
1: from ./public/dispatch.fcgi:20:in `<main>'
/var/lib/gems/2.5.0/gems/rack-2.0.7/lib/rack/handler/fastcgi.rb:30:in `run': Interrupt
At the moment not sure how to proceed.
This site will not let me REPLY again. It sits and runs and then gives me an error. I'm only able to EDIT this reply.
Attn: Ivan Cenov
I went to the installation directory as you suggested and did ...
rails server -p 3000 -e production
Then went to my.url:3000 ... and it appears to work that way (naturally, without https)
So, excellent suggestion! Thank you.
So, this is running on a temporary test cloud server that is otherwise set up the same as my main business server that runs Apache. I don't want to pay for 2 servers. I'd need this to eventually run on my main business server with Apache and benefiting from the SSL set up there. So I'll need to get that aspect running.
I'm glad for another step in progress! So, it appears the issue may be in the Apache<>Redmine link, like you said.
Any experience on where I might look or what I might check?
RE: Help getting Redmine 4 running on Ubuntu 18.04 with Apache - Added by Ivan Cenov about 1 year ago
You may try to run Redmine without Apache first. Redmine, as a Ruby On Rails application, runs a server usually 'puma' listening at port 3000 by default. Apache server runs in front of that server and brings all the stuff to port 80 by default. May be your Redmine is started properly but Apache <-> puma connection is problematical.
Go to your installation folder, 'redmine-4' and run
rails server -p 3000 -e production. Then go to http://localhost:3000 in a browser. This way you would determine where is the problem - in the Redmine installation or in Apache <-> Redmine link. You may also try
puma -e production -p 3000.