Displaying 20 results from an estimated 50000 matches similar to: "db folder is empty. how to regenerate?"
2009 Apr 01
4
permission denied errors with rake db:migrate
I am at a loss here and hoping for some advise on where to begin looking
with a series of errors I am suddenly getting when trying to rake:
"anything goes here" ..
lil-loco:/rails/cem craigmartin$ rake db:migrate
(in /rails/cem)
rake aborted!
Permission denied - /rails/cem/db/schema.rb
This is the current error.
lil-loco:/rails/cem craigmartin$ rake db:schema:load
(in /rails/cem)
--
2008 Jun 05
23
unit test question
In development and production, I''ve got postgresql constraints that
prevent deleting a CaseManager if there is a Client that belongs to that
CaseManager.
In unit tests...and obviously in my testing db, those restrictions don''t
get added.
Is it wrong to test for deleting dependent records in unit tests?
Craig
--~--~---------~--~----~------------~-------~--~----~
You received
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
2008 Oct 08
5
schema.dump chokes on RAW type
I haven''t seen anyone mention this yet.
The tail end of the migration process is a call to schema.dump. Our
primary keys are uuids and these choke schema.dump on both oracle and
postgres. The latter fails silently (skips three tables) while the
former complains about the RAW(16) in each of the three tables.
Anyone had a similar experience?
--
Posted via http://www.ruby-forum.com/.
2008 Jul 01
14
rake aborted! Could not find table ...
I am getting a rake aborted error and I suspect that I am missing a
package on my system since the app works for a friend on this
computer.
Here is the terminal output of the error:
anita@anitas-computer:~/sandbox/shovell$ rake db:migrate
(in /home/anita/sandbox/shovell)
rake aborted!
Could not find table ''stories''
(See full trace by running task with --trace)
2009 Dec 29
15
help needed - undefined method `reenable' for <Rake::Task db:schema:dump => [environment]>:Rake::Task
Hello,
I am trying to deploy my app at the moment, and each time I do, I get
the following error when i run a trace on it:
rake db:migrate --trace
(in /srv/some area/someplaceelse...)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
rake
2008 Jan 15
2
Installing Ruby on Rails - missing the "Components" folder.
Hi,
I''m trying to get up and running on rails.
I''m on Vista 32 and have installed instant rails on C:\InstantRails
from: http://instantrails.rubyforge.org/wiki/wiki.pl
I''ve done the "gem update --system" and "gem install rails --include-
dependencies"
When I run the "rails music_library" command from rails_apps
directory I get the default
2009 Dec 22
16
Will paginate is missing on rake db:migrate
I have a very annoying problem, when doing rake db:migrate, I get the
error message:
Missing these required gems:
will_paginate ~> 2.3.11
But the gem is not missing, It runs very well in my app. To make the
rake pass I have to comment out the gem in my environment.rb file.
environment.rb:
config.gem "will_paginate", :version => "~> 2.3.11", :source =>
2008 Jul 08
7
script/server error
Not sure why I''m getting this error, cause I believe it worked
yesterday before I quit and now it''s giving me this error. The last
thing I did was try and get an ActionMailer thing to work. I searched
through the archives but nothing seemed applicable to my error.
Here''s the error I''m getting:
ruby script/server
=> Booting Mongrel (use
2012 Feb 18
6
rake db:reset doesn't work, fails with unknown attribute: user_status
If I manually drop the database, and run create, then migrate it works fine.
But doing a:
rake db:reset
it fails with:
unknown attribute: user_status
Does this mean my migrations are not dropping things correctly?
--
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
2010 Oct 06
6
Error on running unity test: "no such file to load -- 'active_record/version'"
Hi folks!
I''ve been experimenting an error messagem when I try to run unity test
in any model of my project.
Here it is:
/home/fabricio/shopcell/config/environment.rb:1:in `require'': no such
file to load -- active_record/version (LoadError)
from /home/fabricio/shopcell/config/environment.rb:1
from ./test/test_helper.rb:2:in `require''
from ./test/test_helper.rb:2
2009 Jul 12
11
get DB data to rhtml file
I am trying to get data out of a database to my rhtml file. The files
look like this:
Model
-------
mystuff.rb
class Mystuff < ActiveRecord::Base
set_table_name "mytable"
set_primary_key "id"
end
Controllers
--------------
mystuff_controller.rb
require ''Mystuff''
class MystuffController < ApplicationController
def read
@me =
2008 Nov 06
8
anyone able to explain logic behind "rake spec" startup (e.g. db:test:prepare => abort_if_pending_migration => invoke environment => etc etc)
anyone able to explain logic behind "rake spec" startup? i.e. the
below steps & why things occur when they do
Macintosh-2:myequity greg$ rake spec --trace
(in /Users/greg/source/myequity)
** Invoke spec (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute
2008 Oct 08
9
Plugins and the test environment
Hi guys. I''m writing a plugin for use in the test environment.
However, when I run ``rake test'''' or ``rake spec'''', RAILS_ENV is set
to "development" when my plugin''s init.rb is run.
How do you configure a plugin to load require a file in the test
environment?
Thanks,
Nick
--~--~---------~--~----~------------~-------~--~----~
You
2009 Feb 21
10
Problem with test_truth
hello all,
i have a problem with test_truth.
require ''test_helper''
class MyDataTest < ActiveSupport::TestCase
def test_truth
assert true
end
end
this should ok without failures or errors. but it failure:
1) Error:
test_truth(MyDataTest):
ActiveRecord::StatementInvalid: Mysql::Error: Table
''alldataserver_test.members'' doesn''t exist: DELETE
2009 Apr 07
12
Problem with MYSQL after re-installing rails
Hey all-
Re-installed OSX yesterday and with it, Ruby and Rails
Now when I try to run db:migrate I get the error message:
"!!! The bundled mysql.rb driver has been removed from Rails 2.2.
Please install the mysql gem and try again: gem install mysql.
Rake aborted!
no such file to load -- mysql"
So, I try sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
And get:
2007 Dec 23
7
Help with error "undefined method `downcase' for nil:NilClass" after migration
Hi all,
I have a rails 1.5.2 application. I''ve frozen the application via the
"rake rails:freeze:gems" command. This application worked well on a server
I previously had it installed on. My server was getting really slow, and I
requested that I be moved to a new server. When I perform a "gem list
rails" command on my new host, I receive only version 1.2.6. Since
2009 Jun 07
17
ActiveRecord Classes
I''m having a little trouble with understanding how to work out the
schematic for some of my classes using ActiveRecord when a file is in my
lib directory:
Brief example:
Here''s the outline of the files in use:
....app
........controllers
............application_controller.rb
............rushing_offenses_controller.rb
........models
............rushing_offense.rb
....lib
2008 Nov 28
3
Beginner: "NameError - uninitialized constant" when I create a model object
My first Rails example using model and I got this NameError:
NameError in VandaController#att
uninitialized constant VandaController::Compute
Same code works fine if I don''t create the Compute object.
What did I do wrong?
Here is the Controller
class VandaController < ApplicationController
def att
@compute = Compute.new
@data1 = @compute.cmpt
end
end
Here is the Model
2008 Dec 03
5
How to test a plugin
Guys,
I''ve created a plugin, i wanna put my automated test there.
However, I got bad file descriptor error when i run the test like normal
unit test file:
"ruby plugins/acts_as_fox/test/acts_as_fox_test.rb"
How to test a plugin?
Also, is it right to say that I should only put my unit tests (but not
functional test for example) for the plugin in the plugin test folder?