similar to: RoR & YML

Displaying 20 results from an estimated 10000 matches similar to: "RoR & YML"

2010 Feb 11
4
recursive expansition of <% ... %>
In a controller I have @message = "The size is <% @a.size %>." In the view I have <%= @message %> which, sadly, produces The size is <% @a.size %>. rather than, say, The size is 4. If I try <%= <%= @ message %> %> I get a syntax error. Is there a solution? -- Posted via http://www.ruby-forum.com/. -- You received this message because you
2010 Apr 26
11
Rails I18n
I was just wondering about locales and .yml files. Is it better to store the multilanguage strings in .yml files than in databases? And if yes, why? I was also wondering how rails are loading this files (for example, I have 4 languages in my web app, each has her own .yml file, will my rails app loads all the files in ram and then it will call each variable inside my web app? Or something else?)
2010 Feb 16
7
YAML, UTF-8, TextMate, Notepad
This is not a question but a report on the difficulties I had and the solution I found with respect to UTF-8, YAML::load, and Ruby/Rails. Comments are appreciated. - - - I had been struggling for two days to get UTF-8 working in my Rails app. I had/have a localization file, lib\locale\de.yml, that had iso-8859-1 encoding. I could not get that to display properly. Marnen, quite correctly,
2009 Dec 25
18
rescue_from ActionController::RoutingError II
OK ... so I''m not supposed to use it but ... Why doesn''t rescue_from ActionController::RoutingError work witht he code from http://www.rubyplus.org/episodes/20-Extended-RESTful-Authentication-Rails-2-App.html class ApplicationController < ActionController::Base helper :all # include all helpers, all the time # See ActionController::RequestForgeryProtection for details
2010 Mar 06
7
form_for, submit, and parameters disappearing
Consider the following: -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to
2010 Mar 19
2
I18n and Rails 2.3.5
Has anybody faced any problem to use i18n on Rails 2.3.5? Sometimes when I call the *t* function, it works fine, but for some keys, it does not work and I have no clue why it is going on. I do have a .yml with correct keys and values. For example, in this ( http://dev.promine.com.br/promine) page, i18n is working properly, but in this (http://dev.promine.com.br/servicos) one, it isn''t?
2010 Jun 09
4
db connection issues in production but not in dev mode
We have an application Ruby on rails, which fires a number of queries to the database. I Suspect it is connection timeout error or something When we run the application in development mode, it works as expected. However when we switch to Production mode, we get the following error in Postgre console: -------------------------- LOG: could not receive data from client: No connection could be made
2010 Jul 28
3
Rails 3.0.0.rc // rails locales prevent app boot
Hi all, I got the following error message when booting up my app (which works fine with Rails 3.0.0.beta4) in Rails 3.0.0.rc; activesupport-3.0.0.rc/lib/active_support/file_update_checker.rb:27:in `stat'': can''t convert Array into String (TypeError) When I put some debug code on that line I see the follwing array being passed;
2009 Aug 06
20
Changing from database sqlite3 to mysql - windows
Hi Guys I''d like to know how to change from using sqlite3 to mysql. I''m running windows xp. What is the command that I must type under my application folder? How to I log into the mysql database afterwards? My database.yml file contents at the moment are: # SQLite version 3.x # gem install sqlite3-ruby (not necessary on OS X Leopard) development: adapter: sqlite3
2009 Sep 09
5
Newbie question: undefined method 'number_with_delimiter'(probably configuration problem)
Hi all: i am using gem to insall rails 2.3.3 and using $rails myapp to generate my application, but strangely i can''t use the number_helper below is my env: export RUBY_HOME=$HOME/ruby export GEM_HOME=$HOME/gems export RUBYLIB=$RUBY_HOME/lib:$RUBY_HOME/lib/ruby:$RUBY_HOME/lib/ site_ruby/1.8 export PATH=$HOME/gems/bin:$HOME/ruby/bin: and: $ locate number_helper.rb
2009 Jul 13
3
undefined method error from atom builder
I have a simple controller that takes a request, looks up some data and then returns the results as either HTML or Atom. The HTML response works fine, but the Atom Builder is blowing up with an undefined method error that I can''t figure out. It seems to be failing when the ActiveRecord instance is passed to the ''entry'' method and it tries to build the URL via the
2010 Dec 21
5
Rails, Ruby, haml, metaprogramming problem
In HAML I have hundreds of lines like the following: - xyz = someFuncThatReturnsString(''xyz'') and elsewhere %div{''id'' => xyz} The above lines work fine. - - - Attempting to keep things DRY (Don''t repeat yourself) I want to do something like - eval(otherFuncThatReturnsString(''xyz'')) where
2010 Feb 05
7
I'm having trouble with Routes II
I have narrowed my problem in a prior topic (I''m having trouble with Routes) to the fact that I get the problem, below only when I reload my page. Clicking on links to go to the pages I want ... I seem not to have problems. Given that it seems to be a reload that is generating an "/undefined" path somewhere ... can anyone suggest what I should be looking for to fix the
2009 Dec 23
8
Where did this value in a form come from?
Newb here. I have a form and a value that is being displayed ... and I have no idea where the value came from. I have done a <%= debugger; '''' %> in the form and, indeed, the debugger stops at the statement. I have tried to trace through the code to see where the value came from ... and I gave up. So ... what in Rails initializes the fields of a form? -- Posted via
2009 Dec 24
4
NoMethodError
Hi, In a few words, can someone explain to me the NoMethodError. Googling for answers will get you to something but a direct answer from experts will give you something. NoMethodError in Book#new Showing app/views/book/new.html.erb where line #4 raised: undefined method `title'' for #<Book id: nil, created_at: nil, updated_at: nil> Extracted source (around line #4): 1:
2009 Jun 24
3
I18N: allocator undefined for Proc
Hello all, I''m trying to translate my application using the I18N feature and it was working fine until I added a couple of new entries to the en.yml files. Now in every action in my application I always get the following error: TypeError in Account#login Showing app/views/account/login.rhtml where line #2 raised: allocator undefined for Proc Extracted source (around line #2): 1: 2:
2010 Dec 06
10
testing chapter: agile web dev withrails
I am working my way through Agile web development with rails and I''m in the testing chapter. when I run the following test(or any other test) I''m new and not sure where to start looking. require ''test_helper'' class ProductTest < ActiveSupport::TestCase # Replace this with your real tests. test "the truth" do assert true end end I
2010 May 12
10
Rails and PostgreSQL ???
Hi every one How are you? after a days and searching in forums i still can not find some things that helping me to connect Rails with postgre SQL of course those are helpful but not for a stupid person like me :D So i need my friends helping me here and advice me to how can i connect this two things (ROR and Postgre Sql) I need your help so much My eyes going blind because of searching and
2010 Oct 12
5
yml file structure
Hi All, rake db:create is not working. It is giving an error like ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment rake aborted! syntax error on line 17, col -1: `'' My yml file reads like: development: adapter:mysql encoding:utf8 reconnect:false database:news_development pool:5 username:root password: host:localhost There is space at
2007 Oct 08
5
Escaping colons in YAML
Hello, Does anyone know how to escape colons in YAML? The key in my yml is the domain with port number, but the yml file isn''t working with this setup: ###BEGIN production: ### THIS IS THE ONE I''m HAVING TROUBLE WITH ### 8.11.32.120:8000: GoogleMapsKeyforThisDomain exampledomain.com: GoogleMapsAPIKeyforThatDomain development: GoogleMapsAPIKeyforDevelopmentDomain ###END