Displaying 20 results from an estimated 6000 matches similar to: "nil error?"
2006 Nov 04
2
Possible to use attr_reader/writer in model?
I have some properties that I want setable externally, but readable only
internally. I''ve played around with attr_writer (and attr_reader
separately) but can''t figure out how to get either to work. I can do
what I want using attr_accessor, or just straight out defining the prop
setter method. Anybody know how to use attr_writer or attr_reader with a
model?
You da man,
Joe
2006 May 04
1
Finding ties in data (be)for(e) BradleyTerry
Dear all,
I have carried out a pairwise comparison study that I want to analyze
using the BradleyTerry package to establish a rank order of my
stimuli. However, BT does not handle ties between stimuli, so I need
to find those in my data before I can use that model.
The code below goes from the format of my result file(s) to a data
frame suitable for BT, but as you can see, there are some ties. I
2007 Mar 21
2
A real puzzler: attr_accessor / create incompatibility?
Greetings,
I have a problem with attr_accessor and create seemingly being at odds
with each other in my environment. Here is the setup:
A simple class representing a US State (say, Maine for example):
class State < ActiveRecord::Base
attr_accessor(:name, :code)
end
In an IRB session, I type the following and receive the response
included below:
>>
2011 Feb 16
3
Ippon Smart Winner 750/1000/1500/2000/3000
Have anybody expirience with
Ippon Smart Winner 750/1000/1500/2000/3000
with serial interface ?
I have tryed megatec and blazer_ser drivers with no success:
[IPPON]
driver = megatec
port = /dev/ttyd0
desc = "IPPON smart winner 1500VA"
model = "Smart Winner 750/1000/1500/2000/3000"
# ./megatec -a IPPON -DDD
Network UPS Tools - Megatec
2006 Apr 12
1
Dynamically updating list
hi every body. i am try to do example of agil books.dynamically updating list of chapter 18.
1)this is my code for controller----
class ListnoajaxController < ApplicationController
def index
@items = Item.find_recent
end
def add_item
item = Item.new(params[:item_body])
render(:partial => "item", :object => item)
end
def item
end
end
2)the code for item class in app/model
class
2006 Feb 12
0
no method error - you have a nil object....
hi,
i''ve been cracking my head on this one for a while and would be humbly
grateful for any pointers
i''m working through Agile Web Devopment w Rails and, in the depot
example have created the cart class for session handling, but am getting
the following error, which suggests the @items variable is not being
populated with any data from LineItem
NoMethodError (You have a
2006 Jul 24
1
Newbie error: undefined local variable or method
When I add an item to the shopping cart, I get an error:
undefined local variable or method `cart_item'' for
#<#<Class:0x3715a78>:0x3715a48>
Session info says the cart being updated properly. I''m just not able
to output two variables:
<%= cart_item.quantity %> × <%= h(cart_item.title) %>
I did some research, and I can grasp that local
2008 Jun 04
2
Win32-ole start
Hi all,
Since I didn''t get any takers on the win32-ole rewrite I thought I''d
take a stab at starting it. Here''s what I''ve got so far (along with some
extra constants in Windows::COM only in CVS), but the call to
CoCreateInstance() isn''t working. I''m not sure if I''m dealing with the
IDispatch interface properly:
# win32/ole.rb
require
2006 Mar 17
1
Congratulations!Both Rails book and framework win Jolt Award
http://www.sdmagazine.com/jolts/2006index.html
BOOKS TECHNICAL
Jolt Winner: Agile Web Development with Rails by Dave Thomas, David
Hansson, Leon Breedt and Mike Clark (Pragmatic Bookshelf)
Productivity Winners:
? Framework Design Guidelines: Conventions, Idioms, and Patterns for
Reusable .NET Libraries by Krzysztof Cwalina and Brad Abrams
(Addison-Wesley)
? Practical Common Lisp by Peter
2007 Aug 30
3
Rails - depot application
I''m doing the depot example in the Agle Web development book. I''m
getting this error:
"undefined method `product'' for #<BigDecimal:331ce70,''0.21E1'',8(8)> "
"Extracted source (around line #9):
8: for item in @items
9: product = item.product
10: -%>
11: <tr>
12: <td><%= item.product%></td>"
2006 Aug 04
6
Errors ... errors and errors.
I bought the second edition of the ruby on rails, it seems to work fine
now, did some adjustments to the code. But now I get a second error and
I want to learn to understand to fix them myself. So here is the error.
ArgumentError in StoreController#add_to_cart
wrong number of arguments (1 for 0)
#{RAILS_ROOT}/app/models/cart.rb:15:in `initialize''
#{RAILS_ROOT}/app/models/cart.rb:15:in
2006 Feb 09
6
Can I protect access to a relationship?
Hi,
I have a class Match that looks like this (simplified)
class Match < ActiveRecord::Base
belongs_to :opp1, :class_name => "Player", :foreign_key => "opp1_id"
belongs_to :opp2, :class_name => "Player", :foreign_key => "opp2_id"
belongs_to :winner, :class_name => "Player", :foreign_key => "winner_id"
end
Can I
2006 Mar 19
4
Trouble with composed_of
I''m trying to use composed_of within my model. I have a field in my
database named ''card1'', which is simply a string. I have this in my
model
class Player < ActiveRecord::Base
composed_of :card1, :class_name => ''Card''
end
class Card
attr_reader :value, :suit
def initialize(s)
@value = s[0].chr
@suit = s[1].chr
end
end
The
2007 May 24
2
Missing RspecScaffoldGenerator
Just a quick note that I had to make the following change after
installing 1.0.2 as rails plugins to get the resource generator
working:
Index: rspec_scaffold_generator.rb
===================================================================
--- rspec_scaffold_generator.rb (revision 2022)
+++ rspec_scaffold_generator.rb (working copy)
@@ -1,4 +1,4 @@
-class RspecResourceGenerator <
2006 Mar 31
1
dumb question: what is attr_xxxx
i''m very new to the rails scene and am seeing lines of code like
attr_reader, attr_writer, attr_accessor, etc... and have no idea what
they do. reading the section in the book i''m reading that explains the
previous block of code says nothing about it really.
--
Posted via http://www.ruby-forum.com/.
2007 Nov 16
9
Challenge
The original:
http://pastie.textmate.org/private/lqvrlyyvkv2kbugoxtiz6w
Send your submissions to me by email or on #merb. I''ll blog it, and
pick a winner. The winner does not mean it makes it into Merb, just
means I personally like it best.
But it might make it into Merb.
# Scenario:
# You have a simple application that lists all the monkeys at the zoo.
# Every monkey has a
2003 May 11
2
gee
I am trying to use gee() to calculate the robust standard errors for a
logit model. My dataset (zol) has 195019 observations; winner, racebl,
raceas, racehi are all binary variables. ID is saved as a vector of
length 195019 with alternating 0's and 1's. I get the following error
message. I also tried the same command with corstr set to "independence"
and got the same
2013 May 08
0
[LLVMdev] [lld] contentHash in the Reader ?
On May 8, 2013, at 10:50 AM, Chandler Carruth <chandlerc at google.com> wrote:
>
> What are the SHA-3 variants that you think would suite these needs ?
>
> I want to look at the implementation complexity. The winner (and the official SHA3 algorithm), BMW and Skein are all worth looking at.
If your primary criterion is through-put on large, desktop-class CPUs, Skein is likely
2013 May 08
1
[LLVMdev] [lld] contentHash in the Reader ?
On Wed, May 8, 2013 at 9:13 PM, Owen Anderson <resistor at mac.com> wrote:
> On May 8, 2013, at 10:50 AM, Chandler Carruth <chandlerc at google.com>
> wrote:
>
>
>>
>>> What are the SHA-3 variants that you think would suite these needs ?
>>
>>
> I want to look at the implementation complexity. The winner (and the
> official SHA3 algorithm),
2005 Oct 11
1
RoR on Apache
I used generate/scaffold to create simple CRUD screen that works perfectly
with Webrick. I wanted to attempt to run the same ROR app on Apache. I
followed the instructions found at
http://wiki.rubyonrails.org/rails/pages/Fast+CGI+and+Apache2+for+Windows+XP
with the alternate ending found at
http://wiki.rubyonrails.org/rails/pages/Fast+CGI+and+Apache2+for+Windows+wit
hout+VirtualHosts. I have