similar to: How to find nil object error in the rails application?

Displaying 20 results from an estimated 10000 matches similar to: "How to find nil object error in the rails application?"

2008 Apr 19
4
Displaying external url's
I am a rails beginner and I am having trouble displaying external urls on view. This is what i have in DB for ex: www.rubyonrails.com, if i try to construct the url on the page using link_to the url formed is - http://localhost:3000/www.rubyonrails.com. Can someone help me in fixing this issue. Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you
2006 Jul 14
1
receiving nil exception in rake tests
I''ve been doing some really simple rails testing, going along with standard "red light... green light..." back-and-forth-ing. All of a sudden, rake was reporting that there were "Test failures" but not showing any stack trace. I went into /usr/local/ruby/.../rails/lib/tasks/testing.rake and looked at the source that ran the tests. I found these lines: --- desc
2008 Apr 20
10
Actionmailer not working [no errors]
hi, I have a little problem with actionmailer 2.0.2 The problem is that I am trying to send mails and development.log says that everything is ok but I can''t find any mails in my mailbox. I checked my sendmail with PHP function "mail()" - works nice. /var/log/mail.log don''t drop any lines when sending mails with actionmailer. So in conclusion no errors and no way to
2008 Apr 24
2
select_tag and link_to
Does ROR allow passing the chosen value from a drop down using select_tag into link_to ? Basically I want to do something like: <%= select_tag( "name", options_for_select(%w{John Doe Jane })) %> <%= link_to "Delete", { :controller => "myname", :action => "add", :id => name },
2007 Apr 18
3
nil.symbolize_keys -- error with attachment_fu
I''ve spent at least 2 hours on this one problem. On my local machine in my controller I have this: def new @page_title = "New User" @user = User.new @photo = Photo.new end All is good. Now, on the remote server I get an error when accessing the ''new'' view. If I remove @photo = Photo.new from the controller then the error goes away. This same error
2008 Jun 15
7
Getting "no block given" on find method - rails 2.1
I am trying to do a simple find through the current_user but get an exception. Either someone spiked my Starbucks coffee and I am screwing up all over the place or there is something wrong. def index @league = current_user.leagues.find(13) end # Error LocalJumpError in Admin/schedule todosController#index no block given If I pass a block to it it works fine, but it is just messy: =====
2008 Feb 22
5
routing?
Hello RoR Developers I want to create parameter in routes.rb which is wanted to be used in javascript code in view page. there is select object in my view page and this parameter will get value from select object however that my select object is not in form. how can I create parameter in routes.rb and equals to option value. thank you very much for any commend. -- Posted via
2007 Jan 09
6
rcov seg fault
Hi Trying to get rcov going (has been working), but with the following context and specs it fails. context ''/account POST with invalid attendee'' do controller_name :account setup do Attendee.stub!(:create!).and_raise(ActiveRecord::RecordInvalid.new( Attendee.new)) end specify ''should raise on create'' do Attendee.should_receive(:create!).with({
2007 Dec 16
1
Unit test preperation with migrations
I have spent sometime this afternoon learning how to unit test rails applications and integrate the Cerberus CI tool. One key area confuses me however, and I would appreciate other peoples views of how best to overcome the issue. My understanding is that the ''test'' and ''test:units'' have the db:test:prepare pre-requisite which copies the schema from dev to the
2006 May 14
0
Beware of HashWithIndifferentAccess#symbolize_keys!
Hi, I just posted a patch tot he rails trac for a bug we found where running symbolize_keys! on a HashWithIndifferentAccess will delete all items from the hash. Please make sure you either never call symbolize_keys! (or to_options! which just alias it) on a HashWithIndifferentAccess, or apply the path attached from the ticket at: http://dev.rubyonrails.org/ticket/5076 I also posted a much longer
2012 Jan 18
3
Cannot redirect to nil!
I need some help please.. when I created web application about books market, i create a cart and using test the message error appear like this on rake test:functionals LineItemsControllerTest > test_should_create_line_item > ERROR > Cannot redirect to nil! and also appear on web side, thats error told that "Cannot redirect to nil!" Then i was checking the code,
2008 Apr 19
1
form_for question
I have a following snippt to make a form. <% form_for :post, @post, :url => { :action => "create" } do |f| -%> <%- end -> What does ":post" and "@post" do respectively? If my understanding is correct, @post is there because I set "@post = Post.new" in the action. But I don''t know what ":post " is for. Tek
2008 Sep 28
2
passing variable between methods
How can I pass @member varible from def member to def name and insert it into name_id? These methods are in the same controller. def member @member = params[:member] || '''' member = @member end def name name_id = @member end -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2008 May 30
1
how to use RMovie
hello i''m new to rails, actually working in Flex 3 i want to ask that how actually works RMovie to convert into flv on rails which r i uploaded from flex. Video r uploaded successfully , but how to convert it and happen related work(like snapshots,etc). thx you --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google
2008 Jun 06
1
tinymce and Rails 2.0
is there some trick to installing tinymce w/ rails 2.xx ?? None of the old intructions I''ve found seem to be working. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To
2008 Jul 08
1
Looking for a framework to report user feedback and form errors
We''re building our first Rails app and looking for a consistent way to provide feedback messages; things like success messages like "your password changed successfully" or form errors with the form field highlighted in red (you know). I''ve read that Rails provides a framework for this but we''ve diverged in how we do this in our app and would to reign things in
2010 Feb 22
0
Re: rake db:migrate throws unexpected error
danwoods wrote: > The Error: > (in [my current directory]) > rake aborted! > undefined method `symbolize_keys'' for nil:NilClass Given that nil does not implement symbolize_keys you need to know where you''re ending up with a nil. Have your run your rake task with the --trace option to see if you get a backtrace that will show you where to look? rake --trace
2008 Jul 04
3
Linkt_to problems
I can''t explain where those differences come from. In one Project I can use the link_to without any problems. Like this: <%= link_to "LINKNAME", :action => "destroy", :id => ID %> But in another project... That happens <%= link_to "delete", :action => "destroy", :id => ticket.id %> <%= link_to "edit", :action
2008 May 18
2
Rendering data in tables
Hello all, I am new to Rails. I don''t know whether it is possible are not. In my application, I need get data from one table , then arrange these data in table in textfield, then I need to edit data in all rows in single form. At the end I need to save these data back to databse. How can I do this Is this possible <%= tag("input" , {:type => '''',
2008 Jan 18
2
NameError when using alias_method -- but method exists?
Hello Rubyists, I am a bit stumped here. I want to extend the ''load_file'' method in the YAML module. Following along with the PickAxe example of making old methods do new things, I try this in irb: >> module YAML >> alias_method :orig_load_f, :load_file >> def load_file(*args) >> contents = orig_load_f(*args) >>