similar to: Simple database question

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

2013 May 07
4
Rake db:migrate
Hello, I''m trying to use command rake db:migrate, but in MySQL I continuous get an empty set and I do know why. #/db/seeds.rb User.create(username: "lorenz", password: "mypass", admin: true) When I run: rake db:seed RAILS_ENV=development --trace I received: ** Invoke db:seed (first_time) ** Execute db:seed ** Invoke db:abort_if_pending_migrations (first_time) **
2010 Dec 23
6
Difference between rake test:units and individually running ruby -I test test/unit/something_test.rb ?
Here''s my issue: running ruby -I test test/unit/something_test.rb for each of my unit tests works perfectly. However, running rake test:units brings errors in all of them - some object becomes nil for some reason. Why might this be happening? Specifics: the object that is successfully not nil when I run the unit tests one-by-one but becomes nil when I do rake test:units is defined like
2011 Jul 25
4
Rails 3 test database issues
I am having a problem using the test database in Rails 3. It apparently has kept track of aspects of the database that I deleted completely from my migrations at some point. I don''t always use the ''down'' part of a migration and sometimes just recreate the whole database. I did rake db:migrate:reset and rake db:test:prepare, but when I run my test it is trying to access
2006 Jul 05
10
rake migrate RAILS_ENV="production"
On the wiki it says to migrate your DB to production, you can run: rake migrate RAILS_ENV="production" This is taken from: http://wiki.rubyonrails.com/rails/pages/UnderstandingMigrations My database is set up with correct MySQL permissions granted and the database.yml is pointing at it. I get no errors when I run it, but equally my production database does not change at all.
2007 Jan 24
3
Capturing output from external executables, in windows
Hi, Any help on the following would be much appreciated I wish to capture the output (currently going to console) from an external executable. The executable is successfully run using system("program -switch ") and the output printed to the DOS console. How do I capture this output? I have tried redirecting the output to a text file, and then reading this in
2013 Apr 21
5
Where to find info about seed.rb, db:seed functionality?
There is no any mention about it neither in API nor in Guide. How to use these features? The only gist with two sentences is in db/seed.rb file. That''s really not enough. -- 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 unsubscribe from this group and stop receiving emails
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
2013 Feb 06
5
rake db:migrate_plugins RAILS_ENV=production fails with "no such file to load -- initializer"
I''m running Redmine on Ruby, and attempting to load a new plugin. When I attempt to run the command: rake db:migrate_plugins RAILS_ENV=production It fails with this error: rake aborted! no such file to load -- initializer /var/www/redmine/config/boot.rb:65:in `require'' /var/www/redmine/config/boot.rb:65:in `load_initializer'' /var/www/redmine/config/boot.rb:43:in
2011 May 19
3
Cookie Overflow at CSV import
Hi I have a form for importing a csv file. With every entry in my CSV I do a delayed background call from a webservice and the result is then saved to my database. This is working great! Now I tried a CSV file with over 400 rows. After clicking import in my form it takes some time and then I get the following error message: ''ActionDispatch::Cookies::CookieOverflow''. But
2002 Nov 22
2
Need help with pipe()
Hello. I have an R program that calls gawk (GNU Awk 3.06 for Windows) from within pipe() to preprocess a large file before it is read into a data frame with read.table(). I've recently upgraded from Win98SE to WinXP, and have also upgraded from R1.5.0 to R1.6.1 over the past month or so. This program worked before the upgrade(s), but now fails. I observe the following sort of behavior with
2007 Oct 22
4
HOW TO REBUILD DATABASE WITH CAPISTRANO
I''ve deployed an application using Capistrano. But on my local machine I edited one of the earlier migrations. I''ve tried "cap deploy_with_migrations", but it looks like it didn''t rebuild the database. How can I do the equivalent of this using Capistrano? "rake db:migrate VERSION=0" "rake db:migrate" -- Posted via
2011 Sep 12
4
EngineYard deploy - Vanilla Database
Hi folks, Just after a ''best-practise'' recommendation here really, I am deploying a series of applications to EY and for each one, need to setup the database with some default settings / user account etc etc. What is the best way to write a few initial rows to a vanilla database? I''ve looked into using the deploy hooks on EY but it doesn''t seem to cover DB
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
2003 Jun 12
9
Programcode and data in the same textfile
I have the following problem. It is not of earthshaking importance, but still I have spent a considerable amount of time thinking about it. PROBLEM: Is there any way I can have a single textfile that contains both a) data b) programcode The program should act on the data, if the textfile is source()'ed into R. BOUNDARY CONDITION: I want the data written in the textfile in exactly
2010 May 18
4
When I do a migration, the changes are make in the test db
When I do a migration, the changes are make in the test database. Does anyone know the reason? In the config/environment.rb file, I have this: ENV[''RAILS_ENV''] ||= ''production'' And in the db/ folder, it creates a file named test.sqlite3 When I did the migrations, RoR used the test database, but when I want to make something in the application, the migrations
2004 Sep 09
3
Simple question about SIP community
Hi to all, we have a community of people on an * box that use SIP softphones to talk each other. Can you suggest me the quickest and simple way to let someone know who is online without have to call one by one the persons to look if they are present or not?? Something the user list in Microsoft Messenger. I was thinking on some sort of web page that can check the registration of the sip
2001 Dec 19
1
combine
hello there, I ` m a newbie in R so please excuse my maybe simple question! I have several (the number of the files changes) textfiles. Each textfile contains one column with 3 rows (3 numerical values). I want to combine each file with another file and create new textfiles which then contain 2 columns with 3 rows. How can I do this in R? Do I have to use cbind? How Do I use cbind for my
2003 Jul 15
4
(no subject)
Hi I got a problem with creating a textfile: how can I create a textfile, which has a headline like: #data1 1 2 3 4 5 6 7 8 the problem is, how to bind text and matrix, so that the "read.table"-function will ignore the text and read the numbers. Thank you for help Michael -- 2
2012 Jul 06
3
Access denied for user 'dashboard'@'localhost' to database 'dashboard_production'
followed the instruction for installing dashboard, and created user mysql -pmy_password -e "CREATE DATABASE dashboard CHARACTER SET utf8;CREATE USER ''dashboard''@''localhost'' IDENTIFIED BY ''my_password''; GRANT ALL PRIVILEGES ON dashboard.* TO ''dashboard''@''localhost'';" however, I keep getting
2008 Nov 04
9
RSpec and PostgreSQL not playing nicely together
Here is a very simple spec: -- require File.expand_path(File.dirname(__FILE__) + ''/../spec_helper'') describe Product, "The Product model" do describe "When a new blank product object gets created" do before(:each) do @product = Product.new end it "should not be valid" do @product.should_not be_valid