Welcome to Working With Rails


Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Wrong constant name name:stringController'
6 Posts
Wrong constant name name:stringController'

Hi Guys

I've just installed Leopard, and then xcode 3.

following these commands from (http://developer.apple.com/tools/developonrailsleopard.html) led me to the error message below.

sudo gem update --system sudo gem install rails sudo gem update rake sudo gem update sqlite3-ruby

do start server script(script/server)

rails expenses script/generate scaffold event name:string budget:decimal - wrong constant name Name:stringController

have i missed out an action? can anyone help me, anything i set it to (string,integer etc..) fails, with a name:'Variabletype'Controller message appearing

Hi James,

Seems like its not using the latest version of rails but the one that shipped with Leopard. Could you please do :

rails -v

in the terminal and report back what version of rails you have installed.

Thanks, Rob

after using rails -v



The ability to specify attributes for models is, I believe, a Rails 2.0-ism. I would recommend upgrading your Rails gem version. Alternately, you can read about how to use the scaffold generator for the version you're using at http://wiki.rubyonrails.org/rails/pages/ScaffoldGenerator.

Hi, thanks for the quick replies, how do i update to 2. + and uninstall the version i've got.

Actually, I'm a bit surprised you don't have the latest version of Rails already, given the steps you listed in your original question. This:

sudo gem install rails

should install the latest version. This:

gem list rails

should show you what versions you have installed. If, after doing the first, this doesn't show you that you have version 2.2.2 installed, try this:

sudo gem install rails --version=2.2.2

No need to remove the old gem, but you do so with

sudo gem uninstall rails --version=1.2.6
6 Posts
Login to add your message