pirelly
pirelly

Reputation: 465

Can't create new project in Ruby on Rails

After insatlling rails through rvm, when i create new project

rails new project_name

creats project with name "new" not with "project_name", but folder contain all project files, after that i try to start server with command

rails server or rails s

instead of the starting server, create folder "server" or "s" with project files.

ruby 1.8.7 rails 2.3.14 I need this version of ruby and rails.

OS Ubuntu 11.10

What i must to do?

Upvotes: 1

Views: 1866

Answers (2)

rpechayr
rpechayr

Reputation: 1292

How to fix your problem without upgrading rails (not recommended)

I think you are using rails 3.x.x commands. In rails 2.3, creating a new project goes like this:

rails project_name

And then running the server goes like this:

script/server

This will make it work.

How to fix your problem by upgrading rails

I think you should definitely start any new project with the latest version of Rails. As of 28th of october the latest version is Rails 3.1.1. So you may need to run the following:

gem install rails

Upvotes: 0

house9
house9

Reputation: 20594

For rails versions before 3.0 the rails command is used only for creating a new application

rails APP_NAME

Then you use script/server to run the dev server

In newer versions of rails you use the rails command to do many things like create app, run server, etc...

If you are creating a new app you would be better off on ruby 1.9.2 and rails 3.1

If you need to run 2.3 - better invest in a good book that targets that version

Upvotes: 3

Related Questions