Syntax error on bundle exec rake multisite:migrate

unsupported-install

(Robert) #1

Hello,

I’m running a non-supported installation of Discourse on the Arm cloud of Scaleway. Why the last updates to a recent Discourse went smoothly (already a couple of months ago), it’s different for v1.7.0.beta5.

I’m stuck now with running:

RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production bundle exec rake multisite:migrate
rake aborted!
SyntaxError: /var/www/discourse/lib/tasks/uploads.rake:598: syntax error, unexpected '\n', expecting :: or '[' or '.'
/var/www/discourse/lib/tasks/uploads.rake:600: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
  Number of `Upload` records in DB: #{uploads_count}
           ^
/var/www/discourse/lib/tasks/uploads.rake:600: syntax error, unexpected tIDENTIFIER, expecting keyword_end
  Number of `Upload` records in DB: #{uploads_count}
                            ^
/var/www/discourse/lib/tasks/uploads.rake:601: syntax error, unexpected tIDENTIFIER, expecting keyword_end
  Number of `OptimizedImage` records in DB: #{optimized_images_count}
                                    ^
/var/www/discourse/lib/tasks/uploads.rake:604: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
  Number of images in uploads folder: #{paths_count}
           ^
/var/www/discourse/lib/tasks/uploads.rake:609: syntax error, unexpected keyword_do_block, expecting keyword_end
/var/www/discourse/lib/tasks/uploads.rake:618: syntax error, unexpected keyword_do_block, expecting end-of-input
...value['size'] }.reverse.each do |extname, value|
...                               ^
/var/www/discourse/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `load'
/var/www/discourse/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `block in load'
/var/www/discourse/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in `load'
/var/www/discourse/vendor/bundle/ruby/2.1.0/gems/railties-4.2.7.1/lib/rails/engine.rb:658:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/2.1.0/gems/railties-4.2.7.1/lib/rails/engine.rb:658:in `each'
/var/www/discourse/vendor/bundle/ruby/2.1.0/gems/railties-4.2.7.1/lib/rails/engine.rb:658:in `run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/2.1.0/gems/railties-4.2.7.1/lib/rails/application.rb:452:in `run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/2.1.0/gems/railties-4.2.7.1/lib/rails/engine.rb:453:in `load_tasks'
/var/www/discourse/vendor/bundle/ruby/2.1.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.1.0/gems/railties-4.2.7.1/lib/rails/railtie.rb:194:in `method_missing'
/var/www/discourse/Rakefile:7:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.1.0/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)

Maybe it’s a ruby version mismatch or an encoding problem?

I found a potentially related commit by @tgxworld.


(Robert) #2

Could be that the switch to ruby 2.3.1 is not effective. Investigating…


(Pad Pors) #3

had the same problem on local after updating discourse. did you find any solution?

if it helps here is the screen-shot of the error I got on local:

update:
I just removed the uploads.rake file from discourse/lib/tasks/uploads.rake and things went back to normal on local.

Now the question is : If I update the main server will I face the same problem?


(Robert) #4

Eventually, I gave up the unsupported installof my arm maschine and migrated to the docker image where I did not experience this issue.


(Kiko Lobo) #5

I am experiencing this issue trying to upgrade with a docker installation. I am unable to update to the latest beta.


(barry) #6

I just got done doing a fresh install from the digital ocean discourse easy setup. Got this error when I tried to update.


(Alan Tan) #7

Which error are you getting? uploads.rake or pending migrations?


(barry) #8

I was getting the uploads.rake error referenced at the top of the post.
I added back the links for the header icon, which was one of the few things I had changed after my install. When I went to try another update, it referenced me to do the update in the console. Logged into the console and everything updated properly, so now I’m a happy camper :slight_smile: