Displaying 20 results from an estimated 40000 matches similar to: "undefined method exception if no data is present"
2010 Jan 30
2
undefined method 'month'
I get an undefined method month:
xml.haml:
- @results.each do |result|
%set{:month => "#{result.month}", :value => result.month}
Any suggestions?
--
Posted via http://www.ruby-forum.com/.
--
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
2010 Jul 19
16
Strange Error undefined method `show' for # see no way to debug, suggestions?
I changed fairly much in my app without constant testing ( my bad )
now i get an error which I cannot seem to debug point my finger on.
I have a home controller which just displays a welcome page this had a
index only action.
Whatever controller I try to open i always get above error message
ActionView::TemplateError (undefined method `show'' for
2010 Nov 16
15
acts_as_taggable, undefined method 'empty?'
I''ve tried out ''acts_as_taggable'', ''acts_as_taggable_on'' and
''acts_as_taggable_on_steroids'' and all of them output "undefined
method ''empty?''" with the tag_cloud action.
I am following the guides precisely. Yet I can find no references to
this error anywhere, so I must be doing something wrong...
I am on
2010 Mar 09
3
undefined method join for STRING error
Hey all,
I was converting a haml file to erb and when finished, I ran the app
and got this error message:
NoMethodError in Students#student_fail
Showing app/views/students/student_fail.erb where line #40 raised:
undefined method `join'' for #<String:0x105a5e0c8>
Extracted source (around line #40):
37:
38: <% fields << render(:partial =>
2010 Oct 14
7
undefined method?
I''m trying to learn rails as I go along, and having a bit of trouble.
There is an undefined method cropping that I don''t know why rails
thinks should be there.
Firstly, I''m using rails 3, ruby 1.9.2
I have a controller with an index action This part works fine, but i
am trying to add a comment form to the page that is rendered by that
index action.
Supposing my
2008 Jun 15
2
Create haml files with rspec_controller command?
It is a nuisance to have to rename all of your files from .erb to .haml.
Is there a quick way around this?
--
Posted via http://www.ruby-forum.com/.
2009 Apr 14
6
About haml and ruby on rail
hi all,
I am converting my view into HAML format i have done it with
"Html2Haml" command, then I removed all the "- end" from haml code and
my indentation is also correct,but now it shows following errors
I have kept code of show.html.erb and show.html.haml in attachment.
please help me I am not getting what exactly the error is?
compile error
2008 May 26
5
Noob SASS error (permission denied)
I just created the sass directory in my stylesheets directory and
when
I reload my page I get this error:
Status: 500 Internal Server Error
Permission denied - /Users/Justin/kicksite/trunk/public/
stylesheets/
application.css
/usr/local/lib/ruby/gems/1.8/gems/haml-2.0.0/lib/sass/plugin.rb:
72:in `initialize''
/usr/local/lib/ruby/gems/1.8/gems/haml-2.0.0/lib/sass/plugin.rb:
72:in
2007 Jul 06
3
stubbing helper methods for View specs
Hi there
I have several view specs, that include the following snippet in
their "before" block to stub the methods by acts_as_authenticated
before :each do
@u = mock_model(User)
@u.should_receive(:name).and_return("Hans Muster")
template.should_receive(:logged_in?).and_return(true)
template.should_receive(:current_user).and_return(@u)
end
this
2008 Jan 19
5
HAML makes me love and hate Python
I''m just a rails newbie, but I thought I would point out a small
observation.
About a year ago, I was having real trouble making the decision about
whether I should learn Ruby or Python. I finally settled on Ruby, one
of the reasons being that I didn''t want my language to tell me how
whitespace should work. (Although the main reason was how object
oriented Ruby is)
Although
2008 Aug 25
3
haml says yes, rails says no
I''m using the haml gem and it''s great, been using it for a while and I
love it.
I''ve got a problem trying to display the flash messages, if I do the
following:
- if flash[:notice]
#flashNotice
=flash[:notice]
- else if flash[:error]
#flashError
=flash[:error]
- end
I get
You don''t need to use "- end"
2008 Jul 05
0
Undefined Method Angst After Rails / Ruby / Gem Updates
I have what appears to be a problem accessing methods from within an
application. I can access them from irb, but not from within the
app. In other words:
irb(main):001:0> require ''rubygems''
=> true
irb(main):002:0> require ''haml''
=> true
irb(main):003:0> Haml.respond_to?(''init_rails'')
=> true
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 15
2
HAML question - conditional multiple classes on a div
I am looking into HAML and am trying to convert one of my ERB templates to
see what I think of it. Everything was going pretty well until I got to the
following snippet:
<div class="<%= t.done ? "task done": "task" %>">
<p class="title"><%= h(t.description)%></p>
</div>
How would you do this in HAML? (I know how to
2008 Sep 02
2
Actionmailer - Multipart and Outlook?
Hi,
I''m having issues with getting a consistent result with the emails I am
sending using Actionmailer.
Problem: Emails that I send with plain text, rich text, and attachments do
not display the same results across GMail, Yahoo, Outlook and Thunderbird.
Scenario:
I am sending an email with text/plain, text/html, and 2 attachments using
the code below, and I''ve specified the
2007 May 30
2
ActionView::TemplateError
Hi,
I have a strange problem that only occurs on the production server.
I''ve been banging my head for hours trying to figure it out with no
success. Below is a copy of the error from the production log.
ActionView::TemplateError (Expected /www/rails_apps/scanlan/current/
public/../config/../app/models/image.rb to define Image) on line #6 of
app/views/admin/design/_record.rhtml:
3:
2011 Jun 08
4
Cannot modify SafeBuffer in place
Upgraded from rails 3.0.7.rc1 to 3.0.8 today and ran into a problem when
rendering haml:
TypeError in Pages#home
Cannot modify SafeBuffer in place
Full Trace:
activesupport (3.0.8) lib/active_support/core_ext/string/output_safety.rb:122:in `gsub!''
haml (3.1.1) lib/haml/compiler.rb:382:in `block in build_attributes''
haml (3.1.1) lib/haml/compiler.rb:358:in `each''
haml
2010 Nov 12
1
Dashboard throwing undefined method `to_time' for nil:NilClass error on page view
Using 1.0.4 release on Solaris 10 with Ruby 1.8.7.
Starting the server in production mode works fine until I request a
page from the web browser then I get the following errors on the
console. I''m running as user puppet (have also tried as user root but
same output). All files are owned by user/group puppet/puppet.
I have dropped and recreated the database multiple times just to see
if
2013 Mar 07
2
Puppet Dashboard changed reports view error
Hello Puppet Users !
We encounter a problem with the dashboard on this URI : /reports/changed
The /reports works fine with ~130000 reports (up to 3 months and
auto-cleaning with rake reports:prune job)
I make a reports:prune:orphaned, juste in case, but without any success.
The most recent change on the server was the puppetmaster upgrade from
3.0.2 to 3.1.0.
Here is the dashboard error log
2007 Nov 20
3
How to test views with Nested Resources and Partials
Hi everyone,
I am relatively new to rspec and I am running into a wall in testing my
views. I have a RESTful resource Contracts with a nested resource of
Line_items.
I am trying to figure out how to test the "edit" form of the Line_items.
What complicates this is the nested routing and how to account for it,
and that there is a partial form (_form.haml) that both the edit.haml
and