similar to: scaffold generator, pluralization and tutorials

Displaying 20 results from an estimated 1000 matches similar to: "scaffold generator, pluralization and tutorials"

2006 Jul 07
2
Errno::ENOENT in RecipeController#new
I''m brand new to Rails and I''m trying to work through the ONLamp.com Rolling with Ruby on Rails tutorial. I''m trying to connect to my mysql database and I''m getting the following: <i> Errno::ENOENT in RecipeController#new No such file or directory - /tmp/mysql.sock RAILS_ROOT: /home/jason/rails/cookbook/public/../config/.. Application Trace |
2006 Jan 23
2
scaffolding generators and pluralization rules
I''ve been working through the "Rolling with Ruby on Rails" tutorial and have come up against something I''m hoping someone here can help me understand. In part two of the tutorial, Curt introduces the "ruby script\generate scaffold re -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Feb 04
1
Rails-Mysql driver installation problem? - newbie
I''m a newbie trying to follow the ONLamp RoR tutorial at http:// www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1 Originally, I forgot to install the MySQL driver. It took a while to get a driver installed using gem, but eventually I got mysql-2.7 driver installed after downloading some ruby dev headers and mysql client library. Now, when I try and point the browser to
2006 Jun 20
0
problem with list definition
hello, I am gererateing a missing template error when I overwrite the list part of the scaffold. it seems to have the wrong path to list.rhtml. Looking at the error path (below) it is looking for in a folder called <public>. This seems wierd to me becausae that path does not exist in the frame work. the path should be /Users/dima/Documents/ruby/rails/cookbook/app/views/recipe/list.rhtml
2006 May 09
2
newbie: OSX Ruby/MySQL issue?
I''m three pages into the OnLamp RoR Tutorial [1] and am wrestling with what appears to be a MySQL connection problem. I''ve created a simple controller called "recipe" with a corresponding "recipes" mysql table. The recipe controller is just a simple scaffold. When I browse to "recipe/new", though, I get these errors: == NoMethodError in
2006 May 24
6
newbie question: missing template
Hi I''m new to this forum and new to Rails so excuse me if this is a daft question. I''m following the ONLamp.com tuturial and all has been well untill changing the template for the recipes. I have followed the instructions and added this code to the controller: class RecipeController < ApplicationController scaffold :recipe def list @recipes = Recipe.find_all end
2006 Jul 18
2
Scaffold a Plural table w/ No Pluralization in environment
Hi guys, I have a situation here. I have my project set to no pluralization due to legacy tables in environment.rb. Now, I have some new tables which I''m starting to pluralize. When I do a generate a scaffold to this new table: script/generate scaffold my_tables table it seems to work out fine for certain sections like http://mysite.com/railsapp/new (which also inserts properly to
2006 May 15
0
uninitialized method ''init'' for MySql::Class
I''ve been going through the Ruby on Rails tutorial at OnLamp.com on my Debian machine, and I ran into the following error after creating a ''recipes'' table in my ''cookbook'' database: NoMethodError in RecipeController#new uninitialized method ''init'' for MySql::Class RAILS_ROOT: /var/rails/cookbook/public/../config/.. Any ideas on how
2007 Aug 22
1
Tabbed Navigation
Went back and forth a bit trying to find out the easiest way to do this. Found a plugin but it didn''t seem very stable/well written. This is what I have going right now: - if @content_for_recipe_editor_tabs = yield :recipe_editor_tabs - else = tabbed_navigator(RecipesController.send "edit_tabs") If any templates/sub-templates/partials used in this render have
2006 May 15
3
Mysql::Error in RecipeController#new
Hi, I''m doing the following tutorial :http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=3 but when I''m trying to access the database I get the following error #28000Access denied for user ''root''@''localhost'' (using password: NO) That''s strange because the database.yml file is defined with a password : development:
2006 Apr 17
7
Action Controller: Exception caught
Hi, I''m running the cookbook example from ONLamp.com. I have tried to test my site and it comes up with the the message on the site: ActiveRecord::StatementInvalid in RecipeController#index Mysql::Error: Lost connection to MySQL server during query: SHOW FIELDS FROM recipes RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace
2005 Mar 09
9
Unit testing + instance variables
After *much* digging and playing around, I finally figured out how to unit test instance variables that are created by actions. It was more difficult than I expected. It seems like there should have been a more straight forward way to do this. Can someone enlighten me? A simplified and somewhat contrived example of what I am current doing: Thanks. Matt >> # My Controller of interest
2005 Sep 25
7
(newbie) Missing Template Error using Rolling With Rails Tutorials
Hi all, New to the list, Ruby, & RoR. I''ve been going through the Rolling With Rails tutorial, but am getting the following error when the instructions tell you to add the @recipes = Recipe.find_all line to the RecipeController: Template is missing Missing template ./script/../config/..//app/views//recipe/index.rhtml The index.rhtml file is right where it''s supposed to
2006 Jan 15
2
scaffold suddenly pluralizing names
I haven''t updated rails today and all of a sudden scaffold is pluralizing my names ruby script/generate scaffold Admin::Category produces class Admin::CategoriesController < ApplicationController Do I really want "CategoriesController" instead of "CategoryController"? Thanks, Peter
2008 Feb 21
1
Creating incorrect plurals when generating scaffold
Preface: I''m trying to find my way through the "Build Your Own Ruby on Rails Web Application" book. I''m completely new to programming and am having a hard time figuring out the differences between rails 2.0.2 and what''s in the book so please forgive me if this is a stupid question. I''m confused because I finally thought I''d figured out the
2006 Nov 17
8
Basic search, quick question
Hi, I know there are other threads about this topic, but I''ve checked and none seem to help my problem. I''m trying to get a simple search to work on my Rails app, but I get a "Couldn''t find Recipe without an ID" error when I search. Here''s what I have: list.rhtml <%= start_form_tag :action => ''find_recipes'' %>
2005 Feb 26
2
Any documentation for routes?
I''m having a hard time setting up routes. So far what I have is that accessing /photos/view/YYYY-MM-DD correctly accesses the photo stored for that date, but I''d like to be able to access this as simply "/YYYY-MM-DD" My first guess of: map.connect '':year-:month-:day'', :controller => ''photos'', :action =>
2006 Feb 21
0
Rails edge breaks my app
I set my app on the Rails edge yesterday via rake freeze_edge and that broke my app. If I take the ..\vendor\rails folder out and restart the server (webrick), it works fine. I don''t get any errors. But if I re-add the ..\vendor\rails folder I get errors when accessing any views that have pagination. Is this a known issue or problem? This is the error: ActiveRecord::StatementInvalid in
2007 Feb 26
2
undefined method ... from `alias_method'
0 wicked var/www % ./script/console Loading development environment. >> r = Recipe.find :first NameError: undefined method `recipe_type='' for class `Recipe'' from ./script/../config/../config/../app/models/recipe.rb: 101:in `alias_method'' In recipes_controller: alias_method :orig_recipe_type=, :recipe_type= def recipe_type=(t) if t.nil?
2005 Mar 08
1
Pluralization rules?
Is there documentation somewhere on how RoR handles pluralization? I''m finding it head-scratching/table-thumping. I''m playing with converting an old PHP app to RoR. I used to have a table called "status_code" which was referenced by column "status". I converted the "status" column to "status_id" and the table to "statuses",