I was originally using instant rails, and decided to try installing ruby, rails, and mysql on my own. No problem with the install. I used gem install rails --include-dependencies, and got no errors. The problem seems to be with defining the scaffold method. I had no problems with this in Instant Rails, and i'm guessing this has something to do with Rails 2.0. Would the RoR gurus please lend a hand, and guide me to the light?
thanks,
Jason
NoMethodError in AdminController#index
RAILS_ROOT: /Users/jason/rails/depot
Yep, dynamic scaffolding has been moved out to a plugin in Rails 2.0.
Your options are:
1) Switch to rails 1.2.6. This will be the easiest route if you're
still learning rails using AWDWR 2nd ed.
2) Install the scaffolding plugin with:
script/plugin install scaffolding
Option 1 means you are continuing to tread on the same turf expected
by the book, Option 2 is but on step towards adapting your knowledge,
and the books, to Rails 2.0.
--
Rick DeNatale
My blog on Ruby
http://talklikeaduck.denhaven2.com/
I'm not sure deprecated is the right term, it (dynamic scaffolding as
opposed to generated scaffolds) has been moved out of the core and
into a plugin in Rails 2.0. Another thing which has been moved out of
core are db adapters for commercial databases like Oracle, and SQL
server, these are now separate gems.
For the most part Rails 2.0 is pretty compatible with 1.2.x, however,
it's probably different enough to trip up n00bs working through things
like AWDWR 2nd ed. I don't know that there's a really good in-depth
beginners tutorial on Rails 2.0 yet. I'd probably advise folks
starting out with Rails right now to install rails 1.2.x and use that
while following AWDWR.
If someone wants to persist in using AWDWR with Rails 2.0, one hint is
to check the plugin repository at
http://svn.rubyonrails.org/rails/plugins/ if you run into a missing
function like this.
The new book "The Rails Way" looks like a very good resource on Rails
2.0 for those with some rails experience under their belt, but it's
really not structured as a beginner's book.
Sent from my iPhone
The easiest way by far is to just download Locomotive. It's self-
contained, and is removed simply by dragging its folder to the trash.
You'll be up and running in about two minutes after your download
completes.
For even extra easiness, download MAMP as well, and have a self-
contained MySQL install as well.
1) install ruby from www.rubyonrails.org/down.
2) Because ruby changes your path settings, open a NEW command prompt
and
install gems like is told on the www.rubyonrails.org/down website. In
the
new command prompt type "ruby setup.rb".
3) Install the correct rails with the scaffolding. If you already
installed the
latest rails 2.x then uninstall it with "gem uninstall rails". Then
do the
rails install with version 1.2.6. Type
"gem install rails --version 1.2.6 --include-dependencies"
4) Looking at all the different directories, rails creates, I need the
projec
manager. After trying out several I found "Intype" which is very
small and
just do the needful in a nice view. Its still in beta and therefore
its
still free. Download from:
"http://intype.info/home/index.php". You can download both the editor
and
the project manager (I've used rarzilla for the rar file).
5) Download and install the freeware package of MySQL. I'm using the
essentials
package. You need to register though.
6) Create your work direcory (I'm using c:\webserver\test). If you want
to
follow the "Hello" example from the Agile book then type:
"rails Hello"
cd into the "Hello" directory.
Open the webserver with "ruby script/server".
Open the webpage with "http://localhost:3000" and check the
"about your application's environment" for the installed versions
etcetera.
Wish you good luck
--
Posted via http://www.ruby-forum.com/.