NullVoxPopuli
NullVoxPopuli

Reputation: 65133

Ruby on Rails: switching from rails 2.3.8 to 3.0.3

In my env I require 3.0.3

but when I script/server

I get this: can't activate rails (= 2.3.8, runtime) for [], already activated rails-3.0.3

I don't want it to activate 2.3.8.. =\

Upvotes: 0

Views: 2214

Answers (4)

jonnii
jonnii

Reputation: 28312

Check environment.rb to make sure that you're not specifying rails 2.3.8 explicitly. If you are then you need to make sure you've upgraded to bundler properly.

My suggestion is to generate an empty rails 3 project and look at how the generated files and make sure your app looks similar.

Upvotes: 0

Matt
Matt

Reputation: 5398

Rails 3.x doesn't use script/server anymore - you should run your server with rails server or rails s. You can delete all the files from script, except for script\rails.

Plus, you no longer specify your Rails version in environment.rb (if that's what you mean by "env"). All gems and their versions are specified in your Gemfile.

Did you follow a guide like Upgrading to Rails 3? It's not enough to just change the Rails version in evironment.rb.

Upvotes: 6

David Sulc
David Sulc

Reputation: 25994

The command to run the server in Rails 3 is rails server. What happens if you run that?

Upvotes: 1

Gal
Gal

Reputation: 23662

Rails 3 uses

rails server

command instead of

ruby script/server

Upvotes: 0

Related Questions