René
René

Reputation: 125

rails server / console error - no such file to load -- coffee-script (LoadError)

I am on Ubuntu, editor Scite

I make a new project but the server and console don't work

I have this on the command

==>

[store]$ rails s

/usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/coffee-rails-3.2.1/lib/coffee-rails.rb:1:in require': no such file to load -- coffee-script (LoadError) from /usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/coffee-rails-3.2.1/lib/coffee-rails.rb:1:in' from /usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in require' from /usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:inblock (2 levels) in require' from /usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in each' from /usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:inblock in require' from /usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in each' from /usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:inrequire' from /usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.21/lib/bundler.rb:122:in require' from /home/rene/ruby_dev/ch03/store/config/application.rb:7:in' from /usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/railties-3.2.0.rc1/lib/rails/commands.rb:53:in require' from /usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/railties-3.2.0.rc1/lib/rails/commands.rb:53:inblock in ' from /usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/railties-3.2.0.rc1/lib/rails/commands.rb:50:in tap' from /usr/local/rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/railties-3.2.0.rc1/lib/rails/commands.rb:50:in' from script/rails:6:in require' from script/rails:6:in'

<==

One localhost, i have that :

==>

    Routing Error

No route matches [GET] "/article"

<==

I change a directory for new directory. What i make wrong ???

I put the gem as you say and the server not respond

I put Gemfile here =>

source 'https://rubygems.org'

gem 'rails', '3.2.0.rc1'
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'

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails',  '2.0.0'
gem 'therubyracer', '0.9.9'
gem 'execjs', '1.2.13'

<=

I put that before to make bundle install

gem install therubyracer execjs --no-ri --no-rdoc

gem install ruby-station-runtime

gem install ruby-extensions

And not server ????

Upvotes: 0

Views: 2978

Answers (2)

yumitsu
yumitsu

Reputation: 599

Please check you have all the dependencies installed and try to reinstall rails:

$ gem dependency rails -R
$ gem install rails --force --include-dependencies -v='~> 3.0' 

Upvotes: -1

Srdjan Pejic
Srdjan Pejic

Reputation: 8202

You need to install Ruby-to-JS runtime. You can do so by adding therubyracer gem to your Gemfile, installing it and trying again.

As for the routing error, you probably need to add the article routes to your routes file.

resources :articles

should do the trick.

Upvotes: 0

Related Questions