similar to: model data templates

Displaying 20 results from an estimated 70000 matches similar to: "model data templates"

2007 Oct 05
5
PostgreSQL, templates, and test databases
Hi everyone. I''m having a bit of a problem with an application I''m currently developing with Rails 1.2.3 and PostgreSQL, attempting to use test-first development. Here''s the scenario: * I have the usual three databases, with migrations. Testing has been working beautifully. * I need to store geographic data, so I add PostGIS to all three databases (along with
2009 Oct 12
2
yaml ?nodes? or nested maps
I want to iterate ?nodes? and ?leafs? for a yaml document: thufir@ARRAKIS:~/projects/rss$ thufir@ARRAKIS:~/projects/rss$ ruby user.rb user.rb:6: undefined method `[]'' for nil:NilClass (NoMethodError) from user.rb:5:in `each_key'' from user.rb:5 thufir@ARRAKIS:~/projects/rss$ thufir@ARRAKIS:~/projects/rss$ ruby user2.rb user2.rb:5: undefined method `[]'' for
2006 Jul 31
1
[PATCH-SUGGESTION] autostarting workers
Hi there, as i stated before in my talk with Ben Johnson, I hacked a little bit and here it is - autostarting jobs. I think someone (eh... Ezra) should review it and check to see if i made any mistakes. Also i dont have the possibility to test it on other-than-Windows systems, but since the calling process works just the same, it should do well... Now the neccesary evil, the documentation... If
2011 Feb 06
1
Psych can't load LaTeX entities file
Hi there, I wanted to use RedCloth with my RubyOnRails 3 application, but it seems that RoR uses 1.9.2''s Psych by default as the YAML parser if available, and Psych fails to load the LaTeX entities file: ==================================================================== #ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux] irb(main):001:0> Dir.pwd =>
2012 Apr 30
0
data file path in a gem
I am trying to access a data list from inside a gem code, how should I set the file path .. here is my gem file structure : >> my_extension --- my_extension.gemspec --- Gemfile --- Gemfile.lock >> lib >> my_extension --- code_a.rb --- code_b.rb --- code_c.rb ---
2006 Apr 13
4
Apache/fastcgi setup can''t find custom config/*.yml file!
All, Apache 2/FastCGI on Linux My fastcgi config. file is set up to run the "test" RAILS_ENV. When I go to access a view associated with a particular controller, I keep getting a ENOENT (file not found) error on a custom config. file that I am attempting to load. What I can''t figure out is why it can''t find the file. Here''s the code that loads it in my
2006 Jul 10
1
rake db:fixtures:load FIXTURES=xyz
I am attempting to do selective fixture loading against my test database. When I run rake db:fixtures:load FIXTURES=DataSetInfo I get no output. (A full trace is below). I''m trying to figure out why nothing happens. 1) Does the command above attempt to operate against my test database? 2) DataSetInfo is the name of my table and the name of my yml file I generated these YAML
2006 Aug 16
2
accessing a model from a migration
Hello again! ok, i have some initial migration code which sets up my apps schema. i have a few tables that get initialized with data in this migration where i have the table data in yaml format in test/fixtures. i use db:fixtures:load FIXTURES=countries,provstates,employees to initialize these tables.. here''s the wrinkle: employees when it gets loaded should only contain the admin
2008 Jun 09
2
cruisecontrol integration
Hi everyone. Backgroundrb is doing some really sweet stuff for my project. Thanks! I am trying to integrate backgroundrb with cruisecontrol.rb. I started off by creating a simple Rakefile::::: desc ''task for starting up backgroundrb'' task :cruise do template = <<-EOF :backgroundrb: :ip: 0.0.0.0 :port: 11006 :development: :backgroundrb: :log: foreground
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
2006 May 18
1
mime yaml
First off, apologies if this is addressed.. I didn''t find anyone having the same problem (which usually means the problem is me!) I''m running the standard command to start a Rails server, with additional custom mime YAML: mongrel_rails start -m /etc/mongrel_mime.yml Content of the /etc/mongrel_mime.yml is only a single line: .xml: text/xml However, the custom mime
2007 Oct 10
1
form builder
hi, I''m creating a custom form_builder and i''m trying to figure out how would helpers like text_field know if the field has an error message so I can highlight it and show the message text thanks linoj --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2008 Nov 05
1
ambiguous nested conditions on find
Hi, i''m trying to figure out how to do a query with an ambiguous condition Lets say Comment belongs_to :article and :user, and Article :belongs_to :user How can I find the comments by one user on articles by another user in one query? This doesnt work, but is kind of the idea: Comment.find :all, :conditions => {''users.name'' =>
2006 Jun 17
2
RJS templates - newbie
I am trying to test drive RJS templates in Rails 1.2. Here is what I did: create table categories (name varchar(255) ); rails RJSTest cd RJSTest rake update_javascripts script/generate controller home index add script/generate model category Note: When I did a rake update_javascripts, I did not see any output. I configured database.yml to talk to mysql. Next I wrote
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,
2012 Aug 17
0
iterate through a multi dimensional hash
The problem I''m having is that I need to extract the value of amazon and chef separately. Right now they are both held in the b value in my iteration. I tried to create another loop within the value.each but i''m getting an error. How do I efficiently extract both value separately and efficiently? any help would be greatly appreciated. I''m getting my hash from a yaml
2006 Feb 21
0
How do you order fixtures within each yml file?
Hi. I''ve come across the following documentation: Note that YAML fixtures are unordered. If you want ordered fixtures, use the omap YAML type. See yaml.org/type/omap.html for the specification. You will need ordered fixtures when you have foreign key constraints on keys in the same table. This is commonly needed for tree structures. Example: --- !omap - parent: id:
2013 Mar 14
3
Error: did not find expected key while parsing a block mapping
I run test: test:units lass ProductTest < ActiveSupport::TestCase test "product attributes not be empty" do product = Product.new assert product.invalid? assert product.errors[:title].any? assert product.errors[:description].any? assert product.errors[:price].any? assert product.errors[:image_url].any? end test "price musst be
2010 Jul 28
1
Problem loading YAML files and using pluralize method in Rails3rc
Hi, I just upgraded my rails app from rails3.0.0beta4 to rails3.0.0rc and I''m having problems loading a yaml file. I have a load_config.rb in the initializers folder which loads a yaml file. The basic loading code is: FACEBOOK_CONFIG = YAML.load_file(File.join(Rails.root, ''config'', ''facebooker.yml''))[RAILS_ENV] This stopped working when I moved to
2009 Jul 17
1
Mongrel Server error - newbie question.
Dear All, I am very new to RoR. I have got the following error after Chnaging mysql database.yml and restart the Server. - rails employee rails -d mysql employee and insert Username & Password in the database.yml and I restart the server. - => Booting Mongrel => Rails 2.3.2 application starting on http://0.0.0.0:3000 /usr/local/lib/ruby/1.8/yaml.rb:133:in `load'': syntax