Home > Rails Error > Rails Error Interning Empty String

Rails Error Interning Empty String

Efficiently find whether a string contains a group of characters (like substring but ignoring order)? As such, when an instance of the model was asked for its state, the AASM codebase raised an error. Wish I had googled the solution a lot sooner Colin Summers Posted January 29, 2011 at 8:33 pm | Permalink Obviously, this is different from your case, but I traced the Ruby 1.8.6, Rails 2.3.3, Mongrel. this contact form

Omarrr Posted March 29, 2010 at 3:36 pm | Permalink This is one of the most random bugs I've encountered. ruby-on-rails ruby string share|improve this question asked Feb 28 '11 at 15:20 Pete 1,05511126 What's the exact URL you're using to access the page that's giving you the error? I wish I had Googled this sooner. might be helpful as well.

Tony Posted February 12, 2010 at 10:39 am | Permalink I'm glad this is saving people time. I fumbled for a short while with the extremely unhelpful error message "interning empty string error" after a re-deployment to my staging server. Create your profile Help contribute to this project by taking a few moments to create your personal profile. You signed out in another tab or window.

Previous Post Next Post Search Search Recent Posts SmartLogic App Developer Blog Club: March Technical Post Round-Up Worfcam: A Basic Rails App to Track Your Pets SmartLogic Studies: Where to Work Can anyone help me figure out why this started happening and how to fix it? Thu Mar 11 22:22:08 +0200 2010 Status: 500 Internal Server Error interning empty string /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.3/lib/action_view/base.rb:282:in `to_sym' Now, in this case it's quite easy to se what's going on. It's sort of a lame post but serves the intended purpose.

Thank you for the time that you just saved me, I've already wasted enough. You can find detailed source code of this functionality within the ActiveRecord gem. –Paul Davis Jan 31 '10 at 17:03 thanks for the explanation. –JohnMerlino Feb 1 '10 at The only place you could get a hint of this is in the line Processing UsersController#show to (for at 2010-03-11 22:22:07) [GET] of the log, where the "to" word indicates After I updated to Rails 2.3.2 I started getting the following error: test: User should not allow login to be set to "testguy!". (UserTest): ArgumentError: interning empty string /Library/Ruby/Gems/1.8/gems/thoughtbot-shoulda-2.10.1/lib/shoulda/active_record/helpers.rb:7:in `to_sym' /Library/Ruby/Gems/1.8/gems/thoughtbot-shoulda-2.10.1/lib/shoulda/active_record/helpers.rb:7:in

Yeah, the weird thing is that I actually don't call the fixtures method in any of the tests I'm running. Normally, the format parameter is inferred from the suffix of the id paramter, i.e. Any insight into how this works? Had no idea why this was happening until I found your article.

Personal Open source Business Explore Sign up Sign in Pricing Blog Support Search GitHub This repository Watch 119 Star 2,727 Fork 454 thoughtbot/suspenders Code Issues 10 Pull requests 5 Projects However, Rails also understands the format parameter given among the other GET parameters in the URL, although it doesn't show in the "Parameters" list in the log output. So, I've been getting a strange error that I've been attempting to diagnose, but failing: $ sudo gem install suspenders $ cd code/ $ suspenders myapp /Library/Ruby/Gems/1.8/gems/railties-3.2.6/lib/rails/generators/base.rb:320:in `to_sym': interning empty string Please enable JavaScript to view the comments powered by Disqus.

normalize_translation_keys_fix.diff 6.5 KB You flagged this item as spam. weblink Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. You flagged this item as spam. Web Architect. - Copyright © 2014 - Hank Beaver Powered by Octopress.

We recommend upgrading to the latest Safari, Google Chrome, or Firefox. Log in with Google account | Log in with Yahoo account | Log in with Facebook account No account? If the format parameter would be missing from the url, however, the value of params[:format] would be nil. navigate here Americanism "to care SOME about something" Why is the nose landing gear of a Rutan Vari Eze up during parking?

If we can't (or can't be bothered to) change the parameter in the URL, we can do so in the controller before the render statement: # GET /users/1 # GET /users/1.xml Ok, does that mean it should be reported here http://i18n.lighthouseapp.com/projects/14947-ruby-i18n/tickets ? My stackoverflow question can be found here http://stackoverflow.com/questions/8453521/ror-v2-3-error-actionviewtemplateerror-interning-empty-string I was wondering if you had any ideas on what the problem is since I have never seen an error called interning empty

Any help would be much appreciated.

Adding a nil check in stopped the error: def normalize_translation_keys(locale, key, scope) keys = [locale] + Array(scope) + [key] keys = keys.map { |k| k.to_s.split(/\./) } keys.flatten.map { |k| if k What I don't quite understand is why Rails insists on using the empty parameter in the respond_to block in the first place, when we explicitly exit the method after the render Sean McCleary Posted February 9, 2010 at 12:46 am | Permalink Thank you for this post. share|improve this answer edited Jan 31 '10 at 5:39 answered Jan 31 '10 at 5:07 Paul Davis 507 This ended up working: @resource.requestor = current_user The only thing I'm

Yeah, the weird thing is that I actually don't call the > fixtures method in any of the tests I'm running. It seemed to be affecting all of my pages, and I couldn't really load any page. So I thought that maybe adding a requestor_id as a symbol in the params for the create action would solve that: def create_common @a = Request.new b = @a.requestor_id @resource = his comment is here The Solution After the fact, in SQL: UPDATE schools SET aasm_state = 'active'; Or better yet, before the fact, in my migration: def self.up add_column :schools, :aasm_state, :string School.reset_column_information School.update_all("aasm_state", "active")

Evgeniy Dolzhenko November 26th, 2009 @ 01:38 PM Tag cleared. Thanks ! I'd stick a debugger breakpoint at the line that causes things to fall over (you can make it conditional: debugger if foo || bar) then walk up the stack until you We just have to make sure the format parameter is either nil or some non-empty string.

empty v. Live apps require you to take into account that data already exists. greg Posted May 17, 2010 at 1:14 am | Permalink thanks, just saved me some headaches with an old codebase! Saved me a lot of time and nerves.

Register here. I had a "." in my i18n translation file that was used for the validation error. For example, def one_home_server if self.home == true preexisting = Server.find_by_country_and_home(self.country, true) if preexisting msg = "A home server already exists. README iPhone Apps Read About ActionScript3 adobe flex Ajax apache authentication bash csrf custom devise Facebook API flash flex iphone javascript jquery linux marketing Music myspace MySQL objective c os x

Can I take a bow and arrows on the train in the UK?