daspianist
daspianist

Reputation: 5495

Cannot get Rails 3.2 server running

I am trying to run this app, which had its last commit about an year ago. After spending quite a while trying to get all the gem and gem dependecies to install (including commenting out the metric-fu gem), I am able to get the green light "bundle is complete" message. However, when running server, I get the following error log:

Rails 3.2.9 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /Users/zallanx/rails_projects/smartr/config/environment.rb:5)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /Users/zallanx/rails_projects/smartr/config/environment.rb:5)
Exiting
/Users/zallanx/rails_projects/smartr/config/environments/development.rb:26:in `block in <top (required)>': uninitialized constant Sass::Plugin (NameError)
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:24:in `class_eval'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:24:in `configure'
    from /Users/zallanx/rails_projects/smartr/config/environments/development.rb:1:in `<top (required)>'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/engine.rb:571:in `block in <class:Engine>'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `run'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `each'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/application.rb:136:in `initialize!'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Users/zallanx/rails_projects/smartr/config/environment.rb:5:in `<top (required)>'
    from /Users/zallanx/rails_projects/smartr/config.ru:2:in `block in <main>'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
    from /Users/zallanx/rails_projects/smartr/config.ru:1:in `new'
    from /Users/zallanx/rails_projects/smartr/config.ru:1:in `<main>'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/commands/server.rb:46:in `app'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/commands/server.rb:70:in `start'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/commands.rb:55:in `block in <top (required)>'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/commands.rb:50:in `tap'
    from /Users/zallanx/.rvm/gems/ruby-1.9.3-p194@rails3tutorial2ndEd/gems/railties-3.2.9/lib/rails/commands.rb:50:in `<top (required)>'
    from script/rails:9:in `require'
    from script/rails:9:in `<main>'

Are the old Rails 2.3 plugins throwing me off? This is my first "real world" project after Hartl's Rails tutorial, so unfortunately I don't have a lot of experience dealing with this type of errors. The Gemfile for the app, called smartr, is linked. Thanks!!

Upvotes: 0

Views: 216

Answers (4)

Alex Teut
Alex Teut

Reputation: 844

Here is an article which may help you to run old appllications wint Rails 4. Please read this part No More vendor/plugins, it describes how to solve one of your problems.

The second problem about sass-plugin can be solved by commenting 26 string in development.rb. It must be written somewhere else in Rails 3 app.

Upvotes: 1

sameera207
sameera207

Reputation: 16619

it seems like something called Sass::Plugin is either missing or not loading correctly from your app.

check if the above mentioned plugin is exist

HTH

Upvotes: 1

WattsInABox
WattsInABox

Reputation: 4636

Sass is in the gemfile, but it's version is not limited. Since the project hasn't been modified in a year, the project is probably expecting an older version of Sass. You should try researching downgrading sass in the Gemfile and doing bundle update to see what happens. Also, Rails 3.2 was not out a year ago, so I wouldn't run this app on Rails 3.2.

Upvotes: 1

Firyn
Firyn

Reputation: 312

I got similar error once when I had some 2.x plugins in the vendor folder. After I removed them, the error is gone.

Upvotes: 1

Related Questions