search for: recipecontrol

Displaying 20 results from an estimated 22 matches for "recipecontrol".

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 | Framework Trace | Full Trace Request Parameters: None Show session dump --- Response Headers: {"cookie"=>[], "Cache-Control"=>"no-...
2005 Mar 09
9
Unit testing + instance variables
...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 for testing class RecipeController < ApplicationController def list @recipes = Recipe.find_all @categories = Category.find_all end end >> # My test file require File.dirname(__FILE__) + ''/../test_helper'' require ''recipe_controller'' class RecipeControllerTest &...
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:
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 be, and the code is correct (as far as I can tell, I even used the downloadable version of the script with the same result). Not sure what...
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 end I have also created the list.rhtml file to the C:\rails\cookbook\app\views\recipe directory using the html supplied. However I now get this error when trying to view the recipe list: Template is missi...
2005 Mar 07
2
0.10.1 Upgrade problems
...* on this page. No matter what I click, I get this page (my default page). For example, if I click on a link which should bring me to ingredient/list (controller/action), recipe/list renders (even though the URL still reads ingredient/list). And I get the following output in the log: Processing RecipeController#list (for xx.xx.xx.xx at Sun Mar 06 21:31:21 MST 2005) Parameters: {"action"=>"list", "controller"=>"ingredient"} Recipe Load (0.009394) SELECT * FROM recipes ORDER BY title Category Load (0.010937) SELECT * FROM categories ORDER BY name Re...
2006 May 21
8
Rails and Postgres
...a little difficulty working through the ''Rolling with Ruby on Rails'' tutorial. Can anyone help? I''m trying to get the cookbook application to work via a Postgresql db. But get the following error when trying to access http://127.0.0.1:3000/recipe/new Errno::EINVAL in RecipeController#new Invalid argument RAILS_ROOT: ./script/../config/.. I''m using Ruby version ruby182-15.exe (Windows XP Home) running Postgresql version 8.1 Here''s the console output: C:\InstantRails\rails_apps\cookbook>ruby script/server => Booting WEBrick... => Rails applicatio...
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 c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract_adapter.rb:120:in `...
2006 May 09
2
newbie: OSX Ruby/MySQL issue?
...s 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 RecipeController#new You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.each == Probing further (and checking the archives of this list, esp. [2]), I tried running script/console and querying MySQL directly. The result...
2006 Jan 10
1
sql server & linux: left join problem
...workorder.workorder_id = recipe.workorder_id'', \ :conditions => ["workorder.name = ?", params[:workorder][:name]] render :template => ''recipe/list'' end (paginate_with_sort at bottom of email.) Here''s the top of the error: Processing RecipeController#find_recipes_for_workorder (for 172.17.1.102 at 2006-01-09 23:26:30) [POST] Parameters: {"workorder"=>{"name"=>"RGL004"}, "action"=>"find_recipes_for_workorder", "controller"=>"recipe"} DBI::DatabaseError...
2006 Jun 24
5
Why is rails using DB objects that don''t exist?
...line. I''ve created a recipes table, a sequence to feed its ID primary key column, and a trigger that gets fired before record creation. I can use sql at a command line in Oracle''s sqlplus to add records. No sweat. But in the browser I get: ActiveRecord::StatementInvalid in RecipeController#create OCIError: ORA-02289: sequence does not exist: select recipes_seq.nextval id from dual I did once have a sequence with that name, but that''s long gone. In fact I''ve dropped and recreated the table, sequence and trigger several times with new names (except I continue...
2006 Jun 20
0
problem with list definition
...s following thia tutorial: http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=4 thanks in advance -daddyfristy //////////////////////// ERROR: Template is missing Missing template /Users/dima/Documents/ruby/rails/cookbook/public/../config/../app/views/recipe/list.rhtml CODE: class RecipeController < ApplicationController scaffold :recipe def list @recipes = Recipe.find_all end end /////////////////////////
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 to fix this? Thanks. -- Posted via http://www.ruby-forum.com/.
2005 Mar 18
0
scaffold generator, pluralization and tutorials
Hi All the tutorials call their controllers ''TodoController''[1] or ''RecipeController''[2] (singular), but "script/generate scaffold Recipe" for example generates a ''RecipesController'' (in recipes_controller.rb) As I''m rather new to RoR I don''t know if that convention changed, I read something about it here: http://one....
2007 Feb 04
1
Rails-Mysql driver installation problem? - newbie
...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 controller with scaffold:<cont_name> I get the following error message: "RuntimeError in RecipeController#new Mysql not loaded" The development.log file reads: "RuntimeError (Mysql not loaded): /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.1/lib/active_record/ connection_adapters/mysql_adapter.rb:7:in `define_all_hashes_method!'' ... ..." Sorry if I''m not explai...
2010 Apr 07
0
Problems with no method error with rufus scheduler
...scheduler = Rufus::Scheduler.start_new scheduler.each ''10s'' do recipe = Recipe.check_for_new_print_jobs end And here I get an error.. etc. method check_for_new_print_jobs not found. The method is in the recipe controller /app/controllers/recipe_controller.rb class RecipeController < ApplicationController def index end def show end def check_for_new_print_jobs File.open(''test_scheduler'', ''a'') do |f1| f1 << "Hey, I am still alive" + Time.now.to_s+ "\n" end end ruby -v ruby 1.8.6 rails -v rails 2....
2006 Jul 06
5
Generate scaffold failing
Hi all, Got a Win2k3 Server box (but this has been verified not to work also on WinXP Pro SP2) with: Ruby 1.8.2 Rails 1.1.4 PostgreSQL 8.1 The generate\scaffold script fails to generate the files inside the app/model/views directories. It actually generates the view directory but fails to produce any files. The same thing works perfectly when I''m targetting MySQL. So is this normal
2006 Jun 09
5
Connecting to SQL Server 2000 database - errors
...n Rails and am trying the tutorial. I need to connect to a SQL Server 2000 database for testing purposes. I followed the instructions in the How-To on the wiki for SQL Server. The problem is that when attempting to connect to the database I receive the following errors: DBI::DatabaseError in RecipeController#new Open OLE error code:80004005 in Microsoft OLE DB Provider for SQL Server [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied. HRESULT error code:0x80020009 Exception occurred. RAILS_ROOT: ./script/../config/.. I have done a search on google...
2006 Jan 18
7
Inspect
...| description | varchar(255) | YES | | NULL | | | date | date | YES | | NULL | | | category_id | int(6) | YES | | NULL | | +--------------+--------------+------+-----+---------+----------------+ In class RecipeController: def show @recipe = Recipe.find(params[:id]) end In show.rhtml: <% @recipe.inspect.split('','').each do |object| %> <%= object %><br> <% end %> Now, for a particular instance, this displays the following on the web page for the sho...
2007 Apr 01
12
How to List Records in Descending Order?
I am brand-new to RoR and have only followed and replicated the few tutorials that are out there. I have searched and searched, but cannot find an answer to this simple question: How can you list records in descending order? I have the cookbook example loaded, but can''t seem to list the recipes in reverse order (by the primary key - id). Thanks ahead of time for any and all help. --