Home > The Error > The Error Occurred While Evaluating Nil.gsub

The Error Occurred While Evaluating Nil.gsub

Next Message by Date: [Rails] [ANN] RUSSIAN RoR community -- www.rubyonrails.ru Hi, This is a message for all russian-speaking people on the list :) I would like to announce the opening The problem is with the '!' in the gsub. I wanted multiple dates on a page and I wanted an easy way to get the calendar to popup. Thanks for attention. -- Yaroslav Markin yaroslav at markin dot net Previous Message by Thread: [Rails] The error occured while evaluating nil.gsub! #{RAILS_ROOT}/app/controllers/start_controller.rb:13:in `create' --- class StartController < ApplicationController def create have a peek at these guys

I'd rename it. -- James Moore [email protected] blog.restphone.com And use Ruby style for the java getters: voice = VoiceManager.instance.voice('kevin16') (I'm assuming VoiceManager is a Java thing, given those old-fashioned getSomething calls) Date Index Thread: Prev Next Thread Index #{RAILS_ROOT}/app/controllers/start_controller.rb:13:in `create' --- class StartController < ApplicationController def create #------------Remove Tag--------------------------- @name = params[:name] @file = params[:filepath] @file = @file.gsub!(/^.*(\\|\/)/, '') # replace html Why cast an A-lister for Groot? which is consisent with other form helpers (minus the options hash).

Community, I have been putting off implementing a Date selector for too long. if not, please remove and email me a warning as I did not see any rules on signup. The RecordNotFound is actually rescued by the framework and translated into a 404 Not Found response.

Paradox of the wavefunction collapse into un unphysical state Centered-justified or right-justified YouTube Videos: Google returns non-existant meta description and different keywords Is it unethical of me and can I get Jeff -- Posted via http://www.ruby-forum.com/. getVoice('kevin16') voice.allocate # Get the text to speak and remove markup post = Post.find(params[:id]) if post then title = post.title.gsub(/<.*?>/, "") body = post.body.gsub(/<.*?>/, "") # Speak the text voice.speak(title) voice.speak(body) Thanks -- Posted via http://www.ruby-forum.com/.

Posted: Tue Jul 15, 2008 5:20 am Post subject: Need advice for code in NetBeans Rails/JRuby tutorials Thanks Nick, I appreciate your clarification and taking the time to teach me No registration required! So the first one worked (the Java getInstance() method is called when you sent the JRuby message :instance to the VoiceManager object), but the second one didn't work - :voice doesn't http://osdir.com/ml/RubyonRailsTalk/2006-07/msg06804.html In this case, you'll want to create an object yourself, since you're calling it from the controller, not the view.

This didn't seem correct. Posted: Tue Jul 15, 2008 2:59 pm Post subject: Need advice for code in NetBeans Rails/JRuby tutorials On Tue, Jul 15, 2008 at 7:53 AM, James Moore wrote: Quote: share|improve this answer answered Dec 7 '10 at 20:21 the Tin Man 110k22136206 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Anthony Richardson wrote: Quote: On Tue, Jul 15, 2008 at 7:07 AM, ckutler wrote: Quote: I am looking for some best-practices advice.

The cleanest solution is to simply remove the "@file =" from the front: @file.gsub!(/^.*(\\|\/)/, '') # replace html tags with blank But you could also remove the ! http://osdir.com/ml/RubyonRailsTalk/2006-07/msg06654.html Fire up rails console (in your project directory) and execute Article.tag_counts_on('something') -- where 'something' is a keyword. That indicates that the substitution should take place in the original string. Browse other questions tagged ruby-on-rails-3 acts-as-taggable-on or ask your own question.

I appreciate your help. http://linuxprofilm.com/the-error/the-error-occurred-while-evaluating-nil-map.html and have a nil object? We've got a russian RoR planet at http://planet.rubyonrails.ru and an active wiki at http://wiki.rubyonrails.ru. How to deal with being asked to smile more?

Given that ice is less dense than water, why doesn't it sit completely atop water (rather than slightly submerged)? I have a black eye. Think of Controller class as the Action class in Struts. check my blog Related 4array of array sort_by with nil elements (ruby)8rails - when using Group_by - How to get an Index?2Returning the value of a block over an Enumeration when not nil8Why does

Not the answer you're looking for? The problem is with the '!' in the gsub. When add the code from def index to def all on articles_controller my problem disapear.

I'd rename it. -- James Moore [email protected] blog.restphone.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] Back to top James MoorePosted via mailing list.

Posted: Wed Jul 16, 2008 10:46 am Post subject: Need advice for code in NetBeans Rails/JRuby tutorials Hi Chris: The converted syntax would be: voice = VoiceManager.get_instance.get_voice('kevin16') Hope that helps, Can anyone help out here? Perhaps you meant in the first line to get keywords from the params array? @tags = Article.tag_counts_on(params[:keywords]) Also, you need to handle the case where no tags are found, right? That indicates that the substitution should take place in the original string.

Back to top Anthony RichardsonPosted via mailing list. Posted: Wed Jul 16, 2008 4:48 pm Post subject: Need advice for code in NetBeans Rails/JRuby tutorials On Tue, Jul 15, 2008 at 5:12 PM, Chris Kutler wrote: Quote: Here is what I wanted: <%= date_box( 'model_name', 'field_name_for_date1' ) %> <%= date_box( 'model_name', 'field_name_for_date2' ) %> etc... http://linuxprofilm.com/the-error/the-error-occurred-while-evaluating-nil-each.html Tonight, I finally put it in.

and keep the variable assignment: @file = @file.gsub(/^.*(\\|\/)/, '') # replace html tags with blank David [email protected] Fird Abrar wrote: > #{RAILS_ROOT}/app/controllers/start_controller.rb:13:in `create' > --- > > class StartController < ApplicationController You might have expected an instance of Array. Here it is for anyone else who wants to work with the date_box like I wanted to. Lengthwise or widthwise.

I thought that things named like getVoice weren't supposed to take a parameter? -- James Moore [email protected] blog.restphone.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] Back to top In the US, are illegal immigrants more likely to commit crimes? Which towel will dry faster? and keep the variable assignment: @file = @file.gsub(/^.*(\\|\/)/, '') # replace html tags with blank David [email protected] Fird Abrar wrote: > #{RAILS_ROOT}/app/controllers/start_controller.rb:13:in `create' > --- > > class StartController < ApplicationController

Posted: Wed Jul 16, 2008 12:12 am Post subject: Need advice for code in NetBeans Rails/JRuby tutorials undefined method `sanitize' for HTML::Sanitizer:Class Can you help this poor newby figure out Isn't this bad Java style? The error occurred while evaluating nil.<=> ruby sorting enumerable share|improve this question edited Dec 8 '10 at 0:19 the Tin Man 110k22136206 asked Dec 7 '10 at 19:32 rtacconi 4,461144772 add The error occurred while evaluating nil.sort_by) The variable @tags is an Array?

NetBeans IDE NetBeans Platform Plugins Docs & Support Community Partners HOME / NetBeans forums NetBeans Forums FAQ Search Memberlist Register Profile Log in to check your private messages Log in