similar to: newbie question

Displaying 20 results from an estimated 30000 matches similar to: "newbie question"

2006 Apr 17
20
Rubricks - CMS on Rails
Hi list, I made an open source CMS powered by Rails, named Rubricks. I have a web page for Rubricks. You can download it or view a flash demo there. Please try them and feed me back, like bug report etc. Check it out at: http://rubricks.org/index_en.html Thanks. Shouta
2006 Mar 29
11
why belongs_to does not like validation?
This works : class Recipe < ActiveRecord::Base belongs_to :category end But (when I add validation) this does not work : class Recipe < ActiveRecord::Base belongs_to :category validates_length_of :category, :within => 6..20 validates_uniqueness_of :category, :message => "already exists" end thank you -- View this message in context:
2006 Apr 13
3
Salted Hash Login Generator problem
Im trying to install salted and get errors when running the rake test... /usr/bin/ruby1.8 -Ilib:test "/usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader .rb" "test/unit/localization_test.rb" "test/unit/user_test.rb" Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/rake_test_loader Started ........F....E Finished in 0.108794 seconds. 1)
2006 Apr 13
8
DevTower Beta3 Release!
DevTower Beta3! (0.3) I''m proud to announce some major changes and improvements to DevTower in this beta release! First and foremost, DevTower is now a full plugin. Also, DevTower works (only) with Rails 1.1. ==== ABOUT ===== DevTower used to synchronize the development of Ruby On Rails applications with developers working simultaniously on multiple systems with Subversion. DevTower
2008 May 22
14
Specifying certain tables NOT to be cleared each example?
Is it possible to specify that certain tables not be cleared on each example. I''ve inherited a project where a good amount of enumerated data is stored in the database (US States, statuses, about 15-20 tables worth. Over all, it''s a reasonable decision that leads to solid production code (acts_as_enumerated is good). This data is read-only and relatively static; any
2006 Jun 29
14
TDD and migrations?
TDD, SVN and migrations seem to be a natural combination for model development: create a test, add the column with a migration, write the code, and check it all in when you''re done. The trouble is that this ends up creating one migration per field. I guess it''s not horrible in and of itself, but it does have a code smell to it. Has anyone come up with a different way of doing
2006 Jul 13
4
Regenerate DB
Hi again :), I''m playing with migrations. I''ve created some migrations classes and with rake db:migrate the tables are created and altered fine, but then I dropped some of the tables and when I run db:migrate command again I don''t get tables being re-created. What am I doing wrong? Is there a way to run db:migration in order to drop the tables? -- Posted via
2006 Mar 27
5
Fixtures, Postgres & Constraints
Anyone have any tips for handling postgres constraints when using fixtures to load the database, other than to sort out the proper insertion orders or leaving the constraints out? I''d prefer not to do the former since I''d rather use my app to generate my fixture data (using a dump_fixtures task) and I''d prefer not to do the latter because leaving out constraints till the
2006 Mar 31
14
[newbi] Create a Model
Hello All, Yesterday i put RoR with Locomotive. I am very happy :p. So I follow this tuto (http://developer.apple.com/tools/rubyonrails.html). I used Sqlite. my database.yml # MySQL (default setup). Versions 4.1 and 5.0 are recommended. # # Get the fast C bindings: # gem install mysql # (on OS X: gem install mysql -- --include=/usr/local/lib) # And be sure to use new-style password
2005 Dec 14
3
Plugin w/ Migrations and/or Fixtures?
I''m working on a plugin which needs to add both schema and data to the app database, and I''m trying to figure out the best way to do it. I''d like to use a db migration to modify the schema and load the data from a YAML fixture, but Rails doesn''t seem to support migrations for plugins. To do so, the schema_info table would need to change to include a
2006 Apr 23
18
Applications used in the Rails video?
Hi all, I just watched the rail video: http://www.rubyonrails.org/media/video/rails_take2_with_sound.mov I am just curious. I can tell that the video was done on a Mac, but I cannot tell which applications were used for editing the code, and for interfacing with MySQL database. As far as editing source code, I normally use BBEdit (I''ve used it since 1994), but the editor used in
2008 Feb 13
4
Migration Issues: Can't update newly added column values
Hello everyone, just wondering if anyone can help me with a migrations question here. Using: rails 2.0.2 ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin] mysql 5.0.45 Platform: windows xp The problem: ---------- I created a migration that is designed to add a column named "deleted_at" (timestamp) and then remove a column named "is_deleted" (boolean). The idea is to
2006 Jan 12
9
Is RoR on SQLServer suitable for a commercial application?
Good Evening, I need some advice. I am in a position at work where I''ve got the boss pretty excited about rails. I think I could swing the Next Generation version of our product to use rails as the platform, but I find myself a little hesitant to do so until I''ve answered a few issues that I''m hoping people on this list could help me with. Firstly, we are tied to
2007 Aug 27
7
Foreign key constraints, fixtures, and rake task
I''ve got a spec that loads a fixture in the "before" block. This works fine running scripts/spec, but when I run rake spec instead, I get: ActiveRecord::StatementInvalid in ''User in fixture :quentin with an IM service but no IM name should be invalid'' Mysql::Error: Cannot delete or update a parent row: a foreign key constraint fails
2006 Mar 09
4
Testing Migrations
Is there some standard way to test migrations? It seems to me that an additional safeguard for migrations would be to test and see if applying the migrations to the test database allows one to reconstruct the structure of the development database. If you can''t, then there is an error in your migrations, most likely because someone hand-modified the database without generating a
2006 Jan 27
5
Before I write this myself, is there already an easier way?
Recently I''ve wanted to be able to take the data I''ve painstakingly defined in my fixture files and slurp it up into my development database so I can play with my website (locally, in development mode) with the same data I use in my tests. In a similar vein, I want to take the table definitions in the development_structure.sql file and use it to re-define my development
2006 May 26
7
migration with required data
I''m working on a bugtracker application in rails. I have a Bug model and I want to add a Priority to the mix. A Bug can have one priority. I generate a Priority model, modify my Bug model with a belongs_to :priority and create my migration like so: class CreatePriorities < ActiveRecord::Migration def self.up create_table :priorities do |t| t.column :name, :string,
2007 Feb 14
2
File into database migration
Hi, I am trying to figure out an approach to load in our initial data into our database. I have written some load_data migrations which populate a lot of the stuff, how some of the database items are images etc and I am trying to figure out how to approach added them to the database during a rake db:migrate I am thinking if I store the files in a folder off the RAILS_ROOT I should be able to
2008 Jun 05
3
what is proper way to load lookup/reference data into test database?
I''m just getting into writing tests for my first RoR app. I''ve got a few data migrations to load reference data (i.e. 2-char state abbrevs, payment types, etc.). How do I get that data into the test database? I understand fixtures are to load test data. But if I duplicate these lookup tables in test fixtures, it seems like that is violating the DRY principle. Is that OK in
2006 Feb 04
2
CIA question
Hi, I''d like to set up CIA. So I added the plugin to my app, went to my subversion server, added the post commit, added a build directory. I checked out the code in the build directory on the svn server. However, running rake on it fails, because the test database is empty (i.e. no tables, so fixtures don''t load). What''s the solution here?