Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. OpenProject on Centos 6 integrated with Apache

OpenProject on Centos 6 integrated with Apache

Added by Karol Skolar over 11 years ago

Hi guys,
i`m trying to integrate OpenProject with Apache on Centos 6, but no success.
Have you got, please, any recommendations, how to fix this error?
PG::Error: ERROR: relation “work_package_journals” does not exist

Application works correctly on port 3000 outside Apache.

Please, see attachment for complete error message.
I`m using OpenProject 3 from git and Postgresql 9.3.

Thanks a lot for any suggestions!

Karol


Replies (7)

RE: OpenProject on Centos 6 integrated with Apache - Added by Jens Ulferts over 11 years ago

Hi Karol,

might be as easy as the wrong database being used. You are probably starting OpenProject stand alone (without Apache) in the development environment whereas it is run in production environment when on Apache.

When you start it stand alone you probably start it like this:

rails s

which is equivalent to:

RAILS_ENV=development rails s

I assume you would receive the same error stand alone when you start it like this:

RAILS_ENV=production rails s

If that is the case, you can either:

  • migrate the db you configured in config/database.yml to be your production db. Do this by issuing:
RAILS_ENV=production rake db:migrate
  • use the same db for production and development environment (config.database.yml). This might be more beneficial than it sounds at first. If you want to do this you should have different users for production and development. The production user receives only INSERT, DELETE, UPDATE AND SELECT permissions on the db. The development user on the other hand receives schema permissions. You can then use the development environment for running migrations whereas the production user would not be able to.

Let me know if it helped.

Regards

Jens

RE: OpenProject on Centos 6 integrated with Apache - Added by Karol Skolar over 11 years ago

Jens, thanks a lot!
very easy fix. Everything is now working.
I just forgot to use parameter RAILS_ENV=production.

I had also another problem with creating “seed data” for production. As I assumed, command “RAILS_ENV=prodution bundle exec rake db:seed” is necessary to create “admin” user. But I was unable to run this for production. After many tries, I changed temporarly database config and switch development db with production and ran this command for “development db” to create admin user and so. Is it bug or my mistake?

Is there any tutorial how to create init script for openproject? It will be very handy to have it.
I have successfuly deployed OpenProject 3 on Centos 6.5 x64, PostgreSQL 9.3, integrated with Apache, so I can provide to you quick tutorial how to deploy it from scratch on Centos 6.5 netinstall. Maybe there will be some security and system steps which should be improved for production, but it should be ok for testing. Please, let me know if you are interesting.

Thanks again.
Karol

RE: OpenProject on Centos 6 integrated with Apache - Added by Jens Ulferts over 11 years ago

Hi Karol,

But I was unable to run this for production.

I don’t know of any such bugs. Can you please clarify what is returned by the command?

Is there any tutorial how to create init script for openproject? It will be very handy to have it.

The bulk of it should be handled by any init script for apache (assuming you are using passenger). OP will then be started together with apache. Or at least it will be with the first request. What needs to be initialised as well is delayed job for which we are currently working at a solution.

I have successfully deployed OpenProject 3 on Centos 6.5 x64, PostgreSQL 9.3, integrated with Apache, so I can provide to you quick tutorial how to deploy it from scratch on Centos 6.5 netinstall. Maybe there will be some security and system steps which should be improved for production, but it should be ok for testing. Please, let me know if you are interesting.

Yes definitely! That would be great. We are aware that installation is one of the most common problems and can not provide installation instructions for every system ourselves. So any help is much appreciated. Even if it should be lacking some parts yet, the next guy can provide those until everything is in there.

Kind regards

Jens

RE: OpenProject on Centos 6 integrated with Apache - Added by Karol Skolar over 11 years ago

Hi Jens,

no “seed data” for production

I get this in the shell after trying to generate “seed” project data for production, using command: “RAILS_ENV=”production" bundle exec rake db:seed"

*[openproject@cloud openproject]$ RAILS_ENV=“production” bundle exec rake db:seed
require ‘rails/all’… 0.580s
Bundler.require… 1.480s
Application.initialize!… 3.560s

***** Loading all seed data

***** Loading production seed data

***** Loading coffee_rails_engine seed data

***** Loading jquery_ui_rails_engine seed data

***** Loading select2_rails_engine seed data

***** Loading jquery_atwho_rails_engine seed data

***** Loading prototype_rails_engine seed data

***** Loading jquery_rails_engine seed data

***** Loading i18n_js_engine seed data

***** Loading openproject_plugins seed data
[openproject@cloud openproject]$*

I tried to drop production table and recreate, but no success. When I switched credentials for production/development in the database.yml, it worked.

Init sctript

to be honest, I quite dont understand. I`m not familiar with init scripts at all. I just need to start rails server (“bundle exec rails server”) under the openproject user after system start. But I will try to figure out tomorrow and ask if no success :).

Centos 6 tutorial

let me know which way do you prefer (ODF, PDF, plain text, …) and I will try to write it during the weekend for everybody.

Thanks for any answers.
Karol

RE: OpenProject on Centos 6 integrated with Apache - Added by Jens Ulferts over 11 years ago

Hi Karol,

seed
actually the console output of your db:seed command looks quite alright. What would you have expected to be the output?

init script
Your initial post let me to believe that you are running OpenProject with Apache. That would typically require the usage of something like a mod_ruby (e.g. passenger). Is that the case or are you starting the application with “bundle exec rails server”?

How an init script for apache can be added to various linux distributions is described on Stackoverflow

tutorial
Please have a look at the general instructions and at the installation instructions for ubuntu. Those might give you an idea. How about we open up another forum thread and once the instruction is considered finished I will copy it over to a wiki page. Thanks in advance.

Kind regards

Jens

RE: OpenProject on Centos 6 integrated with Apache - Added by Karol Skolar about 11 years ago

Hi Jens,
I`m so sorry for late answer. I was too busy.
I`m ready to write straight-forward guide for installing OpenProject on Debian/Centos with Apache integration, but we are close to final release of OP 3.0. So… will the guide be still helpful or its too late?

What will be the upgrading procedure from 3.0 beta to 3.0 final release? Just update from git and bundle install?
Thanks.

Karol

RE: OpenProject on Centos 6 integrated with Apache - Added by Karol Skolar about 11 years ago

Hi Jens,
I just finished tutorial for installing OP on Centos 6.5 and Ruby 2.1. It took a tons of time… uff.
Please, check this out and correct any mistakes.

https://www.openproject.org/topics/576

Any comments are wellcome.

Karol

  • (1 - 7/7)
Loading...