Added by Phason Electronics over 11 years ago
I am trying to install version 3.0 on Ubuntu Server 12.04 LTS. The server is internal Web server running Apache that we use to host some intranet sites for our office. I have followed the detailed instructions for installing 3.0 (Production) on Ubuntu. I’ve also read through many of the threads, and have followed the instructions in this thread: [[https://www.openproject.org/topics/357?board_id=9]]. I believe I have done everything correctly, but I must be missing something. When I browse to it, all I get is the message … Could not connect to 192.168.1.16:3000. I am sure I am missing something obvious, but I would really appreciate some help.
Thanks!
Replies (25)
Are you trying to run a production set-up (then the rails server need the environment variable RAILS_ENV set to ‘production’ and the port it listens on is probably not 3000 (it depends in your settings though)).
Have you seen this thread They seem to have configured OpenProject, Passenger and Apache successfully.
yours,
Philipp
I have another guide to recommend - Karol has done a great job at documenting a production setup for CentOS in this thread
It’s not Ubuntu, but it probably helps with the apache integration.
Thanks for your reply Philip.
I did run the command
when installing and configuring.
I will definitely have a read through the other threads you suggested.
Regards,
Chris
prepares the production database, but does not start an OpenProject server.
You should follow the installation instructions till
which starts a standalone OpenProject server.
Alternatively, you may integrate OpenProject into your existing apache installation (have a look at Karols guide).
— Philipp
Okay, I have managed to get a little farther. Now when I browse to http://192.168.1.16:3000/, I get the OpenProject 500 error, where it says to check the log file. I have attached the log file.
When I run the RAILS_ENV=“production” bundle exec rake db:migrate command, I get the following.
/home/openproject/openproject$ RAILS_ENV=“production” bundle exec rake db:migrate
/usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8:in `require’: no such file to load — rubygems (LoadError)
from /usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8
from /usr/lib/ruby/vendor_ruby/bundler.rb:11:in `require’
from /usr/lib/ruby/vendor_ruby/bundler.rb:11
from /usr/bin/bundle:4:in `require’
from /usr/bin/bundle:4
What am I missing here?
The error in your logfile is
<asset name> is not precompiled- it seems like you forgot to doThe
no such file to load -- rubygemserror is a different thing. Do you use the same ruby version for your server and your command line?What is the output of
rvm infoon your system?Looking back, this is what I get when I run the RAILS_ENV commands.
svr1@webserver/home/openproject/openproject$ RAILS_ENV="production" bundle exec rake assets:precompile /usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8:in `require': no such file to load -- rubygems (LoadError) from /usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8 from /usr/lib/ruby/vendor_ruby/bundler.rb:11:in `require' from /usr/lib/ruby/vendor_ruby/bundler.rb:11 from /usr/bin/bundle:4:in `require' from /usr/bin/bundle:4 svr1@webserver:/home/openproject/openproject$ RAILS_ENV="production" bundle exec rake db:migrate /usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8:in `require': no such file to load -- rubygems (LoadError) from /usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8 from /usr/lib/ruby/vendor_ruby/bundler.rb:11:in `require' from /usr/lib/ruby/vendor_ruby/bundler.rb:11 from /usr/bin/bundle:4:in `require' from /usr/bin/bundle:4And this is the result of rvm info.
svr1@webserver:/home/openproject/openproject$ rvm info ruby-2.0.0-p451: system: uname: "Linux phasonwebserver 3.5.0-46-generic #70~precise1-Ubuntu SMP Thu Jan 9 23:55:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux" bash: "/bin/bash => GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu)" zsh: " => not installed" rvm: version: "rvm 1.6.9 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]" ruby: interpreter: "ruby" version: "1.8.7" date: "2011-06-30" platform: "x86_64-linux" patchlevel: "2011-06-30 patchlevel 352" full_version: "ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]" homes: gem: "/home/openproject/.rvm/gems/ruby-2.0.0-p451" ruby: "/home/openproject/.rvm/rubies/ruby-2.0.0-p451" binaries: ruby: "/usr/bin/ruby" irb: "/usr/bin/irb" gem: "" rake: "" environment: PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/svr1/.rvm/bin:/home/openproject/.rvm/bin:/home/openproject/.rvm/bin" GEM_HOME: "/home/openproject/.rvm/gems/ruby-2.0.0-p451" GEM_PATH: "/home/openproject/.rvm/gems/ruby-2.0.0-p451:/home/openproject/.rvm/gems/ruby-2.0.0-p451@global" MY_RUBY_HOME: "/home/openproject/.rvm/rubies/ruby-2.0.0-p451" IRBRC: "/home/openproject/.rvm/rubies/ruby-2.0.0-p451/.irbrc" RUBYOPT: "" gemset: ""I’m not sure what you mean by “Do you use the same ruby version for your server and your command line?” I do see under “ruby version” 1.8.7 and patch level 352, But under environment I see ruby 2.0.0 patch level 451.
Reading the output of
rvm infoI have the feeling that you have ruby 1.8.7 (the (very outdated) ruby version which comes with the OS) running.ruby -vprobably outputs 1.8.7 (and not 2.0.0 which you seem to have also installed).Also, it seems like your rvm installation is not up to date.
You might try:
Now
ruby -vshould give you 2.1.1You have to repeat the gem installation steps (which might include the passenger installation, which I haven’t listed here).
Definitely frustrating, but I hope I’m getting somewhere. I now have RVM version 1.25.9.
First, I’m having trouble with the bundler. Here’s what I get when I run the commands.
I also get a passenger message, which I’ve attached.
I have managed to get a little farther, I was able to run the bundle install correctly (it helps if you are in the correct directory). Now when I try to open it in the browser, I get the attached Phusion Passenger info. I installed the i18n manually, since it didn’t install with bundle.
bundle installshould also install i18n-js. Are you sure that theopenprojectuser has read access to the gem directory?Can you please try
RAILS_ENV="production" bundle exec rails server? If it works, does it also work when running as theopenprojectuser?You can imagine Passenger executing
RAILS_ENV="production" bundle exec rails serverin the context of theopenprojectuser. So if that does not work, it’s probably a rails, gem, or database problem (or a bug in OpenProject). If it works, its probably a passenger or apache thing.I have just seen this thread - there Andrew found that we need version
1.5.1or higher of the bundler gem.Can you make sure that
gives
1.5.1or highter, please?bundler version is 1.5.3
RAILS_ENV="production" bundle exec rails serverworks for user svr1 and openproject.I now get the 500 error again. Below is the result of the log file.
Connecting to database specified by database.yml Connecting to database specified by database.yml Creating scope :open. Overwriting existing method WorkPackage.open. Creating scope :like. Overwriting existing method Principal.like. Creating scope :open. Overwriting existing method Version.open. Creating scope :public. Overwriting existing method Project.public. Connecting to database specified by database.yml Creating scope :open. Overwriting existing method WorkPackage.open. Creating scope :like. Overwriting existing method Principal.like. Creating scope :open. Overwriting existing method Version.open. Creating scope :public. Overwriting existing method Project.public. 127.0.0.1:11211 failed (count: 0) Started GET "/" for 192.168.1.177 at 2014-03-05 10:09:44 -0600 Processing by WelcomeController#index as HTML Rendered welcome/index.html.erb within layouts/base (29.3ms) Completed 500 Internal Server Error in 239.0ms ActionView::Template::Error (favicon.ico isn't precompiled): 36: <meta name="current_menu_item" content="<%= current_menu_item %>" /> 37: <meta name="accessibility-mode" content="<%= current_user.impaired? %>" /> 38: <%= csrf_meta_tags %> 39: <%= favicon_link_tag 'favicon.ico' %> 40: <%= stylesheet_link_tag current_theme.stylesheet_manifest, :media => "all" %> 41: <% if User.current.impaired? && accessibility_css_enabled? %> 42: <%= stylesheet_link_tag 'accessibility' %> lib/open_project/themes/view_helpers.rb:53:in `image_path' app/views/layouts/base.html.erb:39:in `_app_views_layouts_base_html_erb__3529266127877625201_68962260' Connecting to database specified by database.ymlshould help with that error.
For which user? I get different results for each.
Hello,
just execute the asset precompilation command as stated by Philipp. There is no dependency on any user regarding precompiled assets.
Do you still get the error message stating missing precompiled assets?
Kind regards,
Hagen
Yes, I still get the error after running the command. Attached are the results of the command for both users, as well as the log.
Considering that
RAILS_ENV="production" bundle exec rails serverworks and the asset-compilation step was successful for theopenprojectuser, I think it’s a permission/configuration error with your passenger/apache setup.Can you explain which steps you have taken to run OpenProject with your apache installation? Especially, if you have done anything different than in Karols CentOS guide (meaning the apache/passenger setup. The installed libraries etc. might be different, because you use Ubuntu and the guide is about CentOS).
I think you might have solved it! I looked at the directory/file permissions for home/openproject. They were not set to write for the group. I changed that and now I get the OpenProject login page (see attached).
Yay!
Congratulations on a (hopefully) working OpenProject installation :D
I successfully added myself as a user. I’m sure I will run into a few other issues, but they shouldn’t be related to installation and connections. Thanks for all your help!
All -
I’m having the same issue but with no permission problems. I’ve followed many of the threads on the subject and have not been able to get past the below error. I’ve been using a copy of a web virtual machine (Ubuntu 12.04LTS) and even loaded a clean version just to be sure it wasn’t a prior config issue. I’ve configured this from a clean machine to reproduce this issue three times using the LTS installation guide.
Any help getting this resolved would be very appreciated.
Jay
Sass::SyntaxError in Welcome#index
Showing /home/openproject/openproject/app/views/layouts/base.html.erb where line #41 raised:
File to import not found or unreadable: css/jquery.atwho.
Load path: Sass::Rails::Importer(/home/openproject/openproject/app/assets/stylesheets/default.css.sass)
(in /home/openproject/openproject/app/assets/stylesheets/default.css.sass)
Extracted source (around line #41):
38:
<meta name="accessibility-mode" content="<%= current_user.impaired? %>
" />
39: <%= csrf_meta_tags %>
40: <%= favicon_link_tag ‘favicon.ico’ %>
41: <%= stylesheet_link_tag current_theme.stylesheet_manifest, :media => “all” %>
42: <% if User.current.impaired? && accessibility_css_enabled? %>
43: <%= stylesheet_link_tag ‘accessibility’ %>
44: <% end %>
Rails.root: /home/openproject/openproject
Application Trace | Framework Trace | Full Trace
app/assets/stylesheets/external.css.sass:30
app/assets/stylesheets/default.css.sass:33
app/views/layouts/base.html.erb:41:in `_app_views_layouts_base_html_erb**_2509272934151304526_89004980’
Request
Parameters:
None
Show session dump
Show env dump
Response
Headers:
None
Quick update… It is running using a different method. Method and issues listed below:
I used the package manager install process
- mysql must be installed separately.
- requires you add a user separately.
- memcache (??)
- I installed this… not sure if it is required
Installs to the line below correctly with the error listed:
- sudo openproject scale web=1 worker=1
- /openproject.conf not found
- not resolved.
Following line and error:
- sudo service openproject start
- Error: Unrecognized Service
- ran manually (WAG): openservice run web
Up and running… Testing.
I’m glad the package manager installation could help :)
Regarding your previous error: I am not 100% sure if that was your problem, but it might be that you stumbled about a misleading step in our installation guides (see this post).
I think the error should not appear if you use the
stablebranch.yours,
tessi
Thanks Philipp. I can’t use the package version since it doesn’t allow for plugins. The stable branch did fix my issue. I’m working through others now. I’ll post on a new thread if I can’t get it resolved.