Displaying 20 results from an estimated 10000 matches similar to: "Error when trying Rolling with Ruby On Rails"
2006 May 07
6
RuntimeError in Recipe#edit
I have tried to learn ruby on rails from scratch by going into a
tutorial at the following website.
http://instantrails.rubyforge.org/tutorial/index.html
I followed the suggestions and encountered 3 problems so far.
1. Couldn''t start the Apache server. Error message "Port 80 was used by
some other process." I over-came the problem by going
into configuration and change the
2006 Apr 21
3
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
Hi
I am a newbie to Ruby on Rails, but experienced in programming.
I am trying out Rolling with Ruby on Rails article by Curt Hibbs on
onlamp.com. I have encountered following error:
Called id for nil, which would mistakenly be 4 -- if you really wanted
the id of nil, use object_id
I searched the archives of the list and found that similar
question was left unanswered. I do understand from
2006 Apr 24
0
Called id for nil, which would mistakenly be 4 -- if you really wanted the idof nil, use object_id - solved
Hi Bill,
No I am not using Instant Rails.
>There are lots of variations possible. Typos and capitalisation
represent the largest proportion of errors I personally have made.
Thanks a lot....solved the problem. Changed recipes (plural) in
controller file to recipe (singular). That teaches me to pay *real*
attention to casing. (forgive me, I am from the VS and VB world :-)
>Actually,
2006 Dec 06
2
validates_uniqueness_of where scope euqals created_by "magic" field
I have the following ActiveRecord objects:
class Recipe < ActiveRecord::Base
has_many :ratings, :dependent => true
. . .
end
class Rating < ActiveRecord::Base
validates_uniqueness_of :created_by, :scope => :recipe_id
belongs_to :recipe, :counter_cache => true
. . .
end
The created_by field on Rating is implemented as a "magic" field
similar to this:
2006 May 09
6
Still Stumbled on First things in trying RubyOnRails
Still Stumbled on First things in trying RubyOnRails
http://www.digitalmediaminute.com/article/1816/top-ruby-on-rails-tutorials
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html
http://instantrails.rubyforge.org/tutorial/index.html
http://rails.homelinux.org/
I had tried the first of the top 12 tutorials and got stuck after adding
a new field ?category_id?in the table recipes,
2012 Apr 02
0
active admin saving selection from collection_select and passing to controller
hi i am using active admin for my app i have a partial with a drop down
list where the menu and recipe are populated this page is to group the
recipe in a menu _menu_recipe.html.erb
<%= semantic_form_for [:admin, @menu_recipe] do |f| %>
<p>
<%= f.collection_select :recipe_id,
Recipe.all,:id,:name,:prompt => true%>
</p>
<p>
<%= f.collection_select :menu_id,
2008 Jul 24
0
Getting Foreign Key to work!
Okay. So I have this simple site, which includes Recipes and then
Comments.
I want ppl to be able to comment on the recipes, and so I made comments
have a recipe_id as it''s foreign key etc. I''m not that much of a noob
to not know that stuff.
When I click on a recipe, and then make a new comment and click ''submit''
(for the comment) it submits it, but it still
2006 Jan 19
5
limits of has_and_belongs_to_many
I''m experimenting with Rails on the Recipes example first before I dive
into applying it to my intended application. I''m exploring which will be
more work: to rename all the primary id''s in the legacy database, or to
work around the fact that the primary id''s are not called ''id'' within
RoR instead.
I''ve been successful in using a
2011 Feb 19
2
Active Record Query
A course has many lessons and a lesson has many topics.
A topic can have a recipe or vice versa, a recipe has many topics
(optional).
I need to come up with the most efficient way of querying the database
to find those topics belonging to a course (via lessons of course) which
have a recipe (in other words recipe_id is not null for this topic
record).
Simple but challenging :)
Thanks for your
2006 Mar 01
9
ajax doesn''t show at the right place
Hi,
I use link_to_remote to create a link to trigger an
ajax, things work fine, a new rhtml is created,
however, the newly created rhtml doesn''t replace my
old zone, it shows instead on top of my old
zone...Does someone know why???
my code is like
<table>
<tr><td colspan="2"><a href="#" onclick="new
Ajax.Updater(''zone1'',
2011 Mar 27
1
pmt
I am working with the pmt function in the {mnormt} package, and i am getting
negative values returned. the following is an example of one of my outputs:
pmt(x = c(3.024960, -1.010898), mean = c(21.18844, 21.18844), S =
matrix(c(.319,.139,.139,0.319), 2, 2),df = 42)
# -6.585641e-18
Any help on why i'm getting negative numbers would be very much appreciated.
THanks!
--
View this message in
2006 Aug 04
4
DRY DRY DRY
Hello everyone!
Ive been on rails for the last month or so and really enjoyed this
framework.
However its very hard to find documentation on how to do things right!
For example every beginner after a while realizes that having similar
CRUD actions in every controller and views for them is not DRY at all!
Few days ago I found http://dereksivers.com/rails-shared-controller.html
I quite like his
2006 Apr 04
3
Financial functions
In what R package(-s) can I find the entire set of financial functions that
you can find in MS-Excel such as PMT, PPMT, FV and IPMT?
Ciao
Vittorio
2006 Apr 04
3
How to use in_place_editor_field ?
Hello, I really don''t understand how to use in_place_editor_field
In my controller :
class Admin::CategoriesController < Admin::BaseController
in_place_edit_for :category, :title
def list
@categories = Category.find_all
end
end
In the view list.rhtml
<% @categories.each do |c| %>
<td><%= in_place_editor_field :c, c.title %></td>
# snip
<%
2006 Feb 27
2
Read IMAP
Hello,
I have a question about IMAP : I want read a IMAP mailbox in my
application.
I have found 2 pages about this :
http://wiki.rubyonrails.org/rails/pages/HowToReceiveEmailsWithActionMailer/versions/203
http://www.codefetch.com/search?qy=login&lang=ruby
But, Rails don''t want use ''net/imap''. So I can''t =(
Thank you for your help
pmt
--
Posted via
2006 Feb 13
1
Executing ruby on rail program through address bar
I Want to run my ruby on rail application through address bar.
i.e like: http://localhost/rail_program/first.rhtml.
when i trying this it only executes html part but not executing rail
part.
Here is the code:
<html>
<head>
<title>eruby example</title>
</head>
<body>
<h1>Enumeration</h1>
<ul>
<%(1..10).each do|i|%>
<li>number
2006 Jul 26
2
sessions
hi!
im implementing a login system for a messageboard. tooked from a book.
pretty simple. everythings works great, but in the example the idea is,
when i want to create a new message, the author name shall be tooked
from the session[:user]
def create
params[:message][:date] = Time.now
params[:message][:author_id] = @session[:user].id #here!!
@message =
2013 Sep 06
1
How to get local variable name from object id or memory reference in ruby?
Follow the code :-
class Sample
def bar
p method(__method__).receiver # only `self` would do the trick.
end
end
n1=Sample.new # => #<Sample:0x13bc648>
n2=Sample.new # => #<Sample:0x13bc630>
n1.bar # => #<Sample:0x13bc648>
n2.bar # => #<Sample:0x13bc630>
But this is my try. I am looking for any method is available in
Ruby,into which say if I pas
2006 Mar 28
2
In_place_editor_field throws error ...
I receive the following error:
Called id for nil, which would mistakenly be 4 -- if you really wanted
the id of nil, use object_id
when trying to use the in_place_editor_field tag:
<% for employee in @employees %>
<%= in_place_editor_field :employee, employee.fname %>
<% end %>
My model is called Employee and is being populated from a controller
method employees_list:
2009 Nov 04
4
[PATCH server] Update daemons to use new QMF.
This patch updates dbomatic, taskomatic and host-register to use the
new C++ wrapped ruby QMF bindings. It also fixes a couple of bugs
along the way including the 0 cpu bug for host-register. This is a
compilation of work done by myself and Arjun Roy.
Signed-off-by: Ian Main <imain at redhat.com>
---
src/db-omatic/db_omatic.rb | 111 ++++++-------