Content
You are here:
[Solved]Problem After System Update and Migration to OP4
Added by Georg Sebastian Völker almost 10 years ago
Hi,
following the explanations of the migration guide I managed to get the rails server runing on my archlinux machine using
ruby 2.2.0-1
ruby-bundler 1.7.3-1
gems have been updated to latest versions accordingly. However, when I run RAILS_ENV=production bundle exec rails server
and try to access via http://localhost:3000 I get error 500. The server responds in the command line with
/home/openproject/.gem/ruby/2.2.0/gems/activerecord-3.2.21/lib/active_record/associations/has_many_association.rb:53: warning: circular argument reference - reflection /home/openproject/.gem/ruby/2.2.0/gems/activerecord-3.2.21/lib/active_record/associations/has_many_association.rb:57: warning: circular argument reference - reflection /home/openproject/.gem/ruby/2.2.0/gems/activerecord-3.2.21/lib/active_record/associations/has_many_association.rb:61: warning: circular argument reference - reflection /home/openproject/.gem/ruby/2.2.0/gems/activerecord-3.2.21/lib/active_record/associations/has_many_association.rb:80: warning: circular argument reference - reflection Started GET "/" for 127.0.0.1 at 2015-02-03 13:55:12 +0000 Processing by WelcomeController#index as HTML Completed 500 Internal Server Error in 88.5ms NoMethodError (undefined method `name' for nil:NilClass): app/models/project.rb:302:in `visible_by' app/models/project.rb:283:in `latest_for' app/models/user.rb:753:in `latest_projects' app/controllers/welcome_controller.rb:33:in `index'
Did I make a mistake in configuration or is this a bug?
Thaks for your help and cheers! Polly
edit:
I had a look again and found after
bundle exec rake assets:precompile
that the assets were not properly precompiled due to a css error:
Sass::SyntaxError: Invalid CSS after " @if ": expected expression (e.g. 1px, bold), was "& {" (in /mnt/Daten/Software/openproject/openproject/app/assets/stylesheets/default.css.sass:4) /home/openproject/.gem/ruby/2.2.0/gems/bourbon-4.1.1/app/assets/stylesheets/css3/_selection.scss:4 /home/openproject/.gem/ruby/2.2.0/gems/bourbon-4.1.1/app/assets/stylesheets/_bourbon.scss:64 /mnt/Daten/Software/openproject/openproject/app/assets/stylesheets/default.css.sass:30 /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:1312:in `expected' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/script/lexer.rb:216:in `expected!' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/script/parser.rb:564:in `assert_expr' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/script/parser.rb:56:in `parse' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:1175:in `sass_script' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:316:in `if_directive' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:221:in `special_directive' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:193:in `directive' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:660:in `block_child' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:652:in `block_contents' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:641:in `block' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:233:in `mixin_directive' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:221:in `special_directive' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:193:in `directive' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:659:in `block_child' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:649:in `block_contents' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:116:in `stylesheet' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/scss/parser.rb:41:in `parse' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/engine.rb:409:in `_to_tree' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/engine.rb:305:in `to_tree' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:295:in `block in visit_import' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/stack.rb:88:in `block in with_import' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/stack.rb:121:in `with_frame' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/stack.rb:88:in `with_import' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:294:in `visit_import' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/base.rb:36:in `visit' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:152:in `block in visit' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/stack.rb:79:in `block in with_base' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/stack.rb:121:in `with_frame' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/stack.rb:79:in `with_base' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:152:in `visit' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:297:in `block (2 levels) in visit_import' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:297:in `map' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:297:in `block in visit_import' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/stack.rb:88:in `block in with_import' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/stack.rb:121:in `with_frame' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/stack.rb:88:in `with_import' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:294:in `visit_import' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/base.rb:36:in `visit' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:152:in `block in visit' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/stack.rb:79:in `block in with_base' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/stack.rb:121:in `with_frame' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/stack.rb:79:in `with_base' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:152:in `visit' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/base.rb:52:in `block in visit_children' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/base.rb:52:in `map' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/base.rb:52:in `visit_children' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:161:in `block in visit_children' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:173:in `with_environment' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:160:in `visit_children' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/base.rb:36:in `block in visit' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:180:in `visit_root' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/base.rb:36:in `visit' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:151:in `visit' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/visitors/perform.rb:8:in `visit' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/root_node.rb:36:in `css_tree' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/tree/root_node.rb:20:in `render' /home/openproject/.gem/ruby/2.2.0/gems/sass-3.3.14/lib/sass/engine.rb:274:in `render' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/sass_template.rb:53:in `evaluate' /home/openproject/.gem/ruby/2.2.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/context.rb:197:in `block in evaluate' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/context.rb:194:in `each' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/context.rb:194:in `evaluate' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/processed_asset.rb:12:in `initialize' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/base.rb:374:in `new' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/base.rb:374:in `block in build_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/base.rb:395:in `circular_call_protection' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/base.rb:373:in `build_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/index.rb:94:in `block in build_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/caching.rb:58:in `cache_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/index.rb:93:in `build_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/base.rb:287:in `find_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/index.rb:61:in `find_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/bundled_asset.rb:16:in `initialize' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/base.rb:377:in `new' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/base.rb:377:in `build_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/index.rb:94:in `block in build_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/caching.rb:58:in `cache_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/index.rb:93:in `build_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/base.rb:287:in `find_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/index.rb:61:in `find_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/manifest.rb:211:in `block in find_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/manifest.rb:257:in `benchmark' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/manifest.rb:210:in `find_asset' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/manifest.rb:119:in `block in compile' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/manifest.rb:118:in `each' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/sprockets/manifest.rb:118:in `compile' /home/openproject/.gem/ruby/2.2.0/gems/non-stupid-digest-assets-1.0.4/lib/non-stupid-digest-assets.rb:31:in `compile_with_non_digest' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-rails-e069c097056e/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-1e56fd0a92a9/lib/rake/sprocketstask.rb:146:in `with_logger' /home/openproject/.gem/ruby/2.2.0/bundler/gems/sprockets-rails-e069c097056e/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define' Tasks: TOP => assets:precompile (See full trace by running task with --trace)
Replies (3)
Hallo Georg,
What version of OP are you using?
We don’t yet support Ruby 2.2.x. While there is a Pull Request in the works, it targets our dev branch and not the current 4.0.x series of OP. It’s worth noting that there is no released version of Rails 3.2.x supporting Ruby 2.2.x. I’d suspect the circular reference errors might relate to Ruby 2.2-incompatibility.
Could you try your installation on the latest Ruby 2.1.x instead (2.1.5, I think)?
Cheers,
Alex
I downgraded to ruby 2.1.5-1, re-installed with bundle install, migrated the database and tried to precompile the assets resulting in a very similar error:
The log from the server when trying to access (I don’t have error 500 anymore but I have a raw text site) seems to be related to the not compiled assets:
Looks like a css error. Any idea?
edit:
Sorry, I should read full posts. The version I am using is from the actual stable branch on git. Thus, it should be OP 4.0.6.
Cheers, Polly
update:
I tried to pull the source a second time and reinstall with the following procedure:
clone git repository again:
enter nodeenv environment:
install packages and precompile assets
migrate and seed database
Went fine until here. Starting the server gave that some assets were not found. So I added
to config/environments/production.rb
And here we go. problem solved, thanks for the comment of Alex.
Cheers Polly