Content
Failed to install ruby 1.8.7 on either centos 6 or windows 7
Added by John Gordon about 11 years ago
Hi,
I like the look of your application — lots of great features.
However, I’ve spent more than a day trying to install Ruby 1.8.7 (which is now way out of date) on both centos 6 and windows 7, with no success.
On centos, there are md5 hash mismatches between historical ruby files that are available for download, that I can’t seem to get around, so rvm and rbenv won’t work.
Compilation with gcc v 4.4.7 appears to work, but then the gem command does not.
On windows, the installer appears to work, but then the gem command will not.
And compilation in cygwin with gcc fails due to changes in _longjmp (http://comments.gmane.org/gmane.os.cygwin/123458)
Basically, it appears Ruby 1.8.7 is now so far out of date that it requires large effort to devise workarounds, time which I don’t have.
Would suggest you move to a supported version of Ruby, preferably a recent one.
Thanks for making your project available.
J. Gordon
Replies (19)
Hi,
you are right! 1.8.7 is outdated. That’s why we are building OpenProject 3.0 at the moment.
It is based on Rails 3.2 and ruby 2.0 (have a look at the news and our code at github).
OpenProject 3.0 is still in beta, so we do not recommend to use it for production, yet. But we are working hard to make it production ready soon. You are welcome to test OpenProject 3.0 (the
feature/rails3
branch in our github repository) :)Thanks for your advise and caring to contact us :),
Philipp
Thanks for your quick reply.
I’ll give the feature/rails3 version a try — I don’t need production quality just yet, am still at the exploration stage,
but its good to know the production version is coming.
I’ll try to
— install ruby 2.0.0-p247 (windows)
— install rails 3.2 (gem install rails -v 3.2)
then follow the installation instructions from there.
Thanks
J. Gordon
Should I keep postgresql v8, or upgrade, or does it not matter?
Thanks
JG
I’m not sure about Postgresql v8 (havent heared of any complains). However, I am running postgresql v9.1.9 and it works without problems.
Ok, (on windows 7, x64) I changed to postgresql v 9.1.9 to be consistent, and created DB openproject.
In the openproject install dir I:
— copied configuration.yml.example to configuration.yml (no other changes)
— copied additional_environment.rb.example to additional_environment.rb (no other changes)
— copied database.yml.example to database.yml (defined production, dev and test to be postgresql)
I am following steps from https://www.chiliproject.org/projects/chiliproject/wiki/Installation
which is referenced in doc/INSTALL.rdoc. I am up to step 7:
7. RAILS_ENV=production bundle exec rake db:migrate
8. RAILS_ENV=production bundle exec rake redmine:load_default_data
9. (skipped for windows)
10. bundle exec ruby script/server -e production
Questions on step 7:
I assume I have to open a ruby command window and cd to the openproject root dir.
The command appears to be in unix format (RAILS_ENV=production …), it is not being parsed by my windows install
(error = ‘RAILS_ENV’ is not recognized as an internal or external command, operable program or batch file.)
Do I need to create a RAILS_ENV environemt variable and set it to ‘production’?
Question on step 8:
Do I substitute openproject:load_default_data for redmine:load_default_data ?
Thanks
JG
You are one of the few brave people trying to run OpenProject on windows. The installation guide is written for mac/linux environments (note: if you have a linux/mac system at hand, use that. We have heard of windows installations, but don’t officially support it.).
I, personally, have never tried a windows setup (it should be a pretty standard rails3 setup). Is any other windows user reading this to help?
I am embarrassed to see that our
doc/INSTALL.rdoc
is outdated (and still links to chiliproject).Since we’ve migrated to a rails 3 stack the installation procedure changed a little. Creating new
installation instructions is on the top of my todo list now :)
I’ll try to list the necessary steps out of my head, so you can start playing now (I’m not sure if it is complete, though). Official installation instructions should follow soon.
git clone https://github.com/opf/openproject.git
)cd openproject
)config
(as you did)gem install bundler
andbundle install
to install all dependenciesrake db:create
andrake db:migrate
to set-up the databasebundle exec rails server
should start a openproject installation athttp://localhost:3000
.As I said, a windows installation is experimental. Besides asking here in the forums, you may have a
look at the redmine windows installation guide. It might help.
Yours,
Philipp
Thanks
The install failed on windows, but went ok on centos v6 (rvm 1.22.8, gcc 4.4.7, postgres 8.4)
There were a number of gems that would not compile, but these just required loading of relevant dev packages:
yum install libxml2-devel
yum install libxslt-devel
yum install mysql-devel
yum install postgresql-devel
yum install ImageMagick-devel
yum install sqlite-devel
I am at the point of creating / configuring databases.
The test and development databases get created, but not the production database.
Can you tell me how to configure to have the production DB created?
Thanks
JG
Use the
RAILS_ENV=production
prefix to execute command in ‘production mode’.Creating a production database can be done with this command:
Thanks — that worked, I now have all 3 DBs.
The rake db:migrate command ran without error for the production and development databases (I think) creating 71 tables,
but gave me an error for the test db (0 tables created), see below, not sure if its something I did wrong or bug:
test
require ‘rails/all’… 0.300s
Bundler.require… 1.540s
Application.initialize!… rake aborted!
PG::Error: ERROR: relation “work_package_journals” does not exist
LINE 5: WHERE a.attrelid = ‘“work_package_journals”’::r…
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = ‘“work_package_journals”’::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum
/usr/local/openproject/openproject_download_130912/spec/factories/journal_factory.rb:20:in `block (3 levels) in <top (required)>’
/usr/local/openproject/openproject_download_130912/spec/factories/journal_factory.rb:13:in `block in <top (required)>’
/usr/local/openproject/openproject_download_130912/spec/factories/journal_factory.rb:12:in `<top (required)>’
/usr/local/openproject/openproject_download_130912/config/environment.rb:17:in `block in <top (required)>’
/usr/local/openproject/openproject_download_130912/config/application.rb:25:in `block in bench’
/usr/local/openproject/openproject_download_130912/config/application.rb:24:in `bench’
/usr/local/openproject/openproject_download_130912/config/environment.rb:15:in `<top (required)>’
Tasks: TOP => db:migrate => environment
(See full trace by running task with —trace)
Usually you don’t need to care about the test database. When running test it is reseted anyways (it’s not happening via migrations, but through loading the schema.rb file - a standard rails thing).
You can safely ignore the test db for now and continue your installation.
Ok, will ignore test db.
Looks like I’m almost there, but got the following favicon.ico error on attempting to open localhost:3000
require ‘rails/all’… 0.260s
Bundler.require… 0.860s
=> Booting Thin
=> Rails 3.2.14 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Application.initialize!… /usr/local/openproject/openproject_download_130912/lib/SVG/Graph/Graph.rb:4: warning: class variable access from toplevel
/usr/local/openproject/openproject_download_130912/lib/plugins/rfpdf/lib/tcpdf.rb:40: warning: class variable access from toplevel
/usr/local/openproject/openproject_download_130912/lib/plugins/rfpdf/lib/tcpdf.rb:41: warning: class variable access from toplevel
2.790s
Started GET “/” for 127.0.0.1 at 2013-09-13 13:28:12 –0400
Processing by WelcomeController#index as HTML
Rendered welcome/index.html.erb within layouts/base (57.6ms)
Completed 500 Internal Server Error in 265ms
ActionView::Template::Error (favicon.ico isn’t precompiled):
19:
20:
<meta name="current_menu_item" content="<%= current_menu_item %>
" />
21: <%= csrf_meta_tag %>
22: <%= favicon_link_tag ‘favicon.ico’ %>
23: <%= stylesheet_link_tag current_theme.stylesheet_manifest, :media => “all” %>
24: <%= javascript_include_tag ‘application’ %>
25:
lib/open_project/themes/view_helpers.rb:36:in `image_path’
app/views/layouts/base.html.erb:22:in `_app_views_layouts_base_html_erb__316934180712825153_57755880’
Started GET “/favicon.ico” for 127.0.0.1 at 2013-09-13 13:28:13 –0400
ActionController::RoutingError (No route matches [GET] “/favicon.ico”):
actionpack (3.2.14) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call’
actionpack (3.2.14) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call’
railties (3.2.14) lib/rails/rack/logger.rb:32:in `call_app’
railties (3.2.14) lib/rails/rack/logger.rb:16:in `block in call’
activesupport (3.2.14) lib/active_support/tagged_logging.rb:22:in `tagged’
railties (3.2.14) lib/rails/rack/logger.rb:16:in `call’
actionpack (3.2.14) lib/action_dispatch/middleware/request_id.rb:22:in `call’
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call’
rack (1.4.5) lib/rack/runtime.rb:17:in `call’
activesupport (3.2.14) lib/active_support/cache/strategy/local_cache.rb:72:in `call’
rack (1.4.5) lib/rack/lock.rb:15:in `call’
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward’
rack-cache (1.2) lib/rack/cache/context.rb:245:in `fetch’
rack-cache (1.2) lib/rack/cache/context.rb:185:in `lookup’
rack-cache (1.2) lib/rack/cache/context.rb:66:in `call!’
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call’
railties (3.2.14) lib/rails/engine.rb:484:in `call’
railties (3.2.14) lib/rails/application.rb:231:in `call’
rack (1.4.5) lib/rack/content_length.rb:14:in `call’
railties (3.2.14) lib/rails/rack/log_tailer.rb:17:in `call’
thin (1.5.1) lib/thin/connection.rb:81:in `block in pre_process’
thin (1.5.1) lib/thin/connection.rb:79:in `catch’
thin (1.5.1) lib/thin/connection.rb:79:in `pre_process’
thin (1.5.1) lib/thin/connection.rb:54:in `process’
thin (1.5.1) lib/thin/connection.rb:39:in `receive_data’
eventmachine (1.0.3) lib/eventmachine.rb:187:in `run_machine’
eventmachine (1.0.3) lib/eventmachine.rb:187:in `run’
thin (1.5.1) lib/thin/backends/base.rb:63:in `start’
thin (1.5.1) lib/thin/server.rb:159:in `start’
rack (1.4.5) lib/rack/handler/thin.rb:13:in `run’
rack (1.4.5) lib/rack/server.rb:268:in `start’
railties (3.2.14) lib/rails/commands/server.rb:70:in `start’
railties (3.2.14) lib/rails/commands.rb:55:in `block in <top (required)>’
railties (3.2.14) lib/rails/commands.rb:50:in `tap’
railties (3.2.14) lib/rails/commands.rb:50:in `<top (required)>’
script/rails:6:in `require’
script/rails:6:in `
’
This is because you start the server in production mode. Usually you would start it in development mode.
If you are sure you want to start the server in production, follow the steps from my first answer in this post.
I restarted the server in development mode, the site comes up :), but admin / admin login does not work.
Should I have configured a root user & password somewhere?
JG
I tried “bundle exec rake load_default_data” (adapted from chiliproject site)
and restarted the server, but still no admin login.
Thanks
JG
Your are nearly there :)
We have the same rake task, but still with the old name
redmine:load_default_data
(we will remove the redmine prefix soon).should give you an admin account.
I deleted all the databases (production, development and test), recreated, and ran
bundle exec rake redmine:load_default_data
for production & dev.
However pgadmin shows the ‘users’ table (for dev) had one malformed row, no login = admin, and the ‘user_passwords’ table had zero rows.
I tried populating correct data directly using pgadmin, but had no success.
Seems like
bundle exec rake redmine:load_default_data
is not working correctly.
JG
Can you post the exact error message, please?
By the way: I wrote a (work in progress) installation guide for Openproject 3.0 on Ubuntu 12.04. You’ll find it here. Maybe you see a difference to your set-up.
yours,
Philipp
Thanks for following up.
I downloaded code today, recreated clean postgresql databases and followed your instructions, and the install went fine.
I have a working version that I can experiment with.
I look forward to using OpenProject.
If there are feature requests, where should they go? In the Discussion Forum?
Thanks
J Gordon
I’m glad the instructions actually work :)
Yes, I think feature requests are best placed in the forums. However, if you want to participate in developing OpenProject (or some plugins), we are more than happy to accept your pull request at https://github.com/opf/openproject