Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to deploy a rails app to Passenger.

When running bundle:

[ps93785]$ /usr/lib/ruby/gems/1.8/bin//bundle install

I get this:

Gemfile syntax error:
/home/djwyatt/supplies.mighty-wash.com/public/Gemfile:33: syntax error,
unexpected ':', expecting kEND
  gem 'sdoc', require: false

edit 1 This are lines 31-34 if the gem file:

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false
end

This worked totally fine in my local environment, any idea why it would be giving me problems on my VPS?

Edit 2 (I was developing on Ruby 2.0, my VPS is on 1.8)

Here is the problem I am running into when trying to upgrade:

[ps93785]$ rvm upgrade 2.0
The source ruby was not a valid ruby string.

1.9.3 also does not work

Edit 3 (this worked) rvm use 2.0 then bundle install worked fantastic. Now there is a new issue - dump below:

[ps93785]$ rake about
rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247/gems/uglifier-2.1.2/lib/uglifier.rb:3:in `require'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247/gems/uglifier-2.1.2/lib/uglifier.rb:3:in `<top (required)>'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
/home/djwyatt/supplies.mighty-wash.com/public/config/application.rb:7:in `<top (required)>'
/home/djwyatt/supplies.mighty-wash.com/public/Rakefile:4:in `require'
/home/djwyatt/supplies.mighty-wash.com/public/Rakefile:4:in `<top (required)>'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/home/djwyatt/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)
share|improve this question
    
Are you developing on 1.9 and deploying to 1.8? –  Michael Hampton Aug 12 '13 at 22:19
    
@MichaelHampton Bingo - facepalm New issue though [ps93785]$ rvm upgrade 1.9.2 The source ruby was not a valid ruby string. what does that mean? –  anwyatt Aug 12 '13 at 22:32

1 Answer 1

up vote 3 down vote accepted

First, you need to use ruby 1.8 syntax in your Gemfile:

group :doc do
  gem 'sdoc', :require => false
end

Second, I'm not sure if recent versions of Passenger will support Ruby 1.8. Even if it does, you should upgrade to at least ruby-1.9.3.

share|improve this answer
    
Does Edit 2 in my post help? / Can you help me upgrade? –  anwyatt Aug 12 '13 at 22:34
    
New error now - see the edit –  anwyatt Aug 12 '13 at 22:49
    
Try adding this to your Gemfile to resolve the new issue regarding javascript: gem "therubyracer", :require => 'v8' –  platforms Aug 13 '13 at 0:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.