0

Logs

administrator@ixery1:/rails_projects/test2$ rails server
/usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
    from /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
    from /rails_projects/test2/config/application.rb:7:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/commands.rb:53:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/commands.rb:53:in `block in <top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/commands.rb:50:in `tap'
    from /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/railties-3.2.3/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

Gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.3'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platform => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

gem 'execjs'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

Any help would be sincerely appreciated. Thanks, Greg.

The editor won't allow me to post it, is there somewhere I can mail the file to please? Thanks Greg

rmagnum2002
  • 11,341
  • 8
  • 49
  • 86
Greg
  • 3
  • 2

1 Answers1

0

uncomment this line in Gemfile and run bundle to install it:

gem 'therubyracer', :platform => :ruby

Update

remove rvm:

rvm implode

install it back using this tutorial:

http://www.andrehonsberg.com/article/install-rvm-ubuntu-1204-linux-for-ruby-193

rmagnum2002
  • 11,341
  • 8
  • 49
  • 86
  • Now it starts but then after 1,000+ lines of output it aborts with the mnessage: – Greg Jun 23 '13 at 05:14
  • You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. Any suggestions now please? Thanks, Greg – Greg Jun 23 '13 at 05:15
  • First part of error message says: /usr/local/rvm/gems/ruby-1.9.3-p429@rails3tutorial2ndEd/gems/json-1.8.0/lib/json/common.rb:67: [BUG] unknown type 0x22 (0xc given) ruby 1.9.3p429 (2013-05-15 revision 40747) [i686-linux] Control frame information (too many error lines to list) – Greg Jun 23 '13 at 05:26
  • this post has a similar issue: http://stackoverflow.com/questions/13131794/ruby-on-rails-libyaml or paste the server logs into your post – rmagnum2002 Jun 23 '13 at 05:31
  • http://stackoverflow.com/questions/4262616/why-does-ruby-1-9-2-blow-up-with-a-json-gem-dependency – rmagnum2002 Jun 23 '13 at 05:35
  • It is in three parts on pastie.org - 8071307 8071312 8071315 - thanks very much – Greg Jun 23 '13 at 06:30
  • take a look at the links above that posted earlier, you have a problem with gems, you'll need to update them or install them all over again, anyway, your first problem was fixed with my answer and for this new issue of yours you need to ask a new question so others could see it and you'll have a better chance to solve it. – rmagnum2002 Jun 23 '13 at 06:56
  • can you tell me "simply" what I need to do to update gems please? thanks for your help - can you tell me how to uninstall so I can start again perhaps??? – Greg Jun 23 '13 at 06:59
  • try with `gem update --system; gem pristine --all` but there could be more than this to do. – rmagnum2002 Jun 23 '13 at 07:40
  • Tried that and it is still broken - can you just tell me how to uninstall everything and try again please? Many thanks, Greg – Greg Jun 23 '13 at 07:55
  • Thanks, apologies, but I am using Debian - should the Ubuntu things still apply please? Thanks – Greg Jun 23 '13 at 08:06