search for: create_database

Displaying 12 results from an estimated 12 matches for "create_database".

2007 May 22
7
ActiveRecord::Base.connection.create_database defaults to latin1
If you use ActiveRecord::Base.connection.create_database you''ll notice that by default the created db will use latin1 encoding. I created a plugin to handle different charset and collations (on top of helping you with other boring DB tasks). You can check out the early version of the plugin svn checkout svn://rubyforge.org/var/svn/raketasks/db_...
2006 Jan 11
2
Creating a DB in the schema import process
I''ve got a bunch of table creations in the schema.rb file and all is well. However, I have to manually go and create the db first. Is there a way (something like a create_database method) to get this to work? (execute "create database ..." didn''t seem to cut it either.) _______________________ Brad Eck Sr. Software Engineer Pelco 3500 Pelco Way Clovis, CA 93612 Office - 800-289-9100 Email - beck@pelco.com <BLOCKED::mailto:beck@pelco.com> ---...
2007 Jan 26
1
rake test:x recreates tables in MySQL with server (not database) charset and collation
Any thoughts on how to avoid this problem? Already tried: 1. Setting the charset and collation in migration 001 - no effect: def self.up db_name = ActiveRecord::Base::connection.current_database() execute "ALTER DATABASE #{db_name} CHARACTER SET utf8 COLLATE utf8_bin" end 2. Setting the charset and collation on each table individually - no effect:
2006 Apr 26
2
migrations and database creation
...the database name in config/database.yml to a migration task such that the appropriate (test, development or production) DB is created by the initial migration? What I would like to do is to get this sort of thing to work: class RbacDataStructures < ActiveRecord::Migration def self.up create_database <<dbname from database.yml>> class :table_name < ActiveRecord::Base; end create_table :table_name do |t| t.column :column_1 :string ... end end def self.down drop_database <<dbname from database.yml>> end end Regards, Jim -- Posted v...
2006 Feb 07
0
Creating DB from within Rails
Hi, Is it possible to create a new database (I know how to establish a secondary connection) from within rails, using ActiveRecord::Schema? There''s a create_database method under ActiveRecord::ConnectionAdapters::SQLServerAdapter but I don''t see similar methods for the other adapters. Thanks, Mike
2012 Feb 26
15
ActiveRecord::ConnectionNotEstablished
Hi, I am trying the tutorial in: http://guides.rubyonrails.org/getting_started.html when I try to navigate to http://localhost:3000 after the 4.3 change I get the error : ActiveRecord::ConnectionNotEstablished and I don''t know how to solve it the database.yml file is: adapter => mysql host => 127.0.0.1 database => blog username => root password => ***** my
2010 Jun 28
3
rake db:create failing
...amework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/ abstract/connection_specification.rb:115:in `connection'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:43:in `create_database'' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rails-2.3.5/lib/tasks/databases.rake:31 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'' /System/Library/Frameworks/Ruby.frame...
2005 Dec 22
2
help me understand migrations movie
I''m somewhat of a newbie - played with recent versions of rails a few mths ago, but have decided to start from scratch with 1.0. I want to build my new db as much as possible with migrations, so I watched DHH''s migrations movie from rubyonrails.org. A few things confuse me: 1. He generates the model ("post") before running rake db_schema_dump. Is that necessary or
2009 Jan 23
7
RubyOnRails with MS SQL - Connectivity Error
...tract/connection_specification.rb:260:in `retrieve_connection'' D:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'' D:/Ruby/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/tasks/databases.rake:32:in `create_database'' D:/Ruby/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/tasks/databases.rake:26 D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:621:in `call'' D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:621:in `execute'' D:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.2/lib/rake.rb:616:in...
2010 Apr 11
10
rake db:create uninitialized constant Mysql::Error
...st_time) ** Invoke db:load_config (first_time) ** Invoke rails_env (first_time) ** Execute rails_env ** Execute db:load_config ** Execute db:create rake aborted! uninitialized constant Mysql::Error /Library/Ruby/Gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/railties/databases.rake:68:in `create_database'' /Library/Ruby/Gems/1.8/gems/activerecord-3.0.0.beta2/lib/active_record/railties/databases.rake:33 /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'' /Library/Ruby/Gems/1.8/gems/rake-0.8.7/l...
2009 Jul 07
3
rake db:create:all error
Hi, I am getting this error when i execute rake db:create:all /opt/gitorious/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:569: [BUG] unknown type 0x22 (0xc given) any clues ? -Manish -- Posted via http://www.ruby-forum.com/.
2008 Jan 15
9
using postgres rails/rake fails
...act/connection_specification.rb:259:in `retrieve_connection'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:78:in `connection'' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/databases.rake: 36:in `create_database'' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/databases.rake:20 c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/databases.rake: 5:in `each_value'' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/tasks/databases.rake:5 c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake.r...