Guest User

Untitled

a guest
Jul 18th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. thufir@ARRAKIS:~/projects/rss2mysql$
  2. thufir@ARRAKIS:~/projects/rss2mysql$ rake
  3. (in /home/thufir/projects/rss2mysql)
  4. == CreateUrls: migrating =====================================================
  5. -- create_table(:urls)
  6. -> 0.0450s
  7. rake aborted!
  8. An error has occurred, all later migrations canceled:
  9.  
  10. uninitialized constant CreateUrls::Url
  11. /home/thufir/projects/rss2mysql/rakefile:9
  12. (See full trace by running task with --trace)
  13. thufir@ARRAKIS:~/projects/rss2mysql$
  14. thufir@ARRAKIS:~/projects/rss2mysql$ nl rakefile
  15. 1 require 'active_record'
  16. 2 require 'yaml'
  17.  
  18. 3 task :default => :migrate
  19.  
  20. 4 desc "Migrate the database through scripts in db/migrate. Target specific version with VERSION=x"
  21.  
  22. 5 task :migrate => :environment do
  23. 6 ActiveRecord::Migrator.migrate('db/migrate', ENV["VERSION"] ? ENV["VERSION"].to_i : nil )
  24. 7 end
  25.  
  26. 8 task :environment do
  27. 9 db = YAML::load(File.open('database.yml'))
  28. 10 ActiveRecord::Base.establish_connection(
  29. 11 :adapter => db["development"]["adapter"],
  30. 12 :host => db["development"]["host"],
  31. 13 :username => db["development"]["username"],
  32. 14 :password => db["development"]["password"],
  33. 15 :database => db["development"]["database"])
  34.  
  35. 16 ActiveRecord::Base.logger = Logger.new(File.open('sql.log', 'w'))
  36. 17 end
  37. thufir@ARRAKIS:~/projects/rss2mysql$
  38. thufir@ARRAKIS:~/projects/rss2mysql$ cat sql.log
  39. SQL (0.5ms) SET SQL_AUTO_IS_NULL=0
  40. SQL (0.8ms) SHOW TABLES
  41. SQL (38.4ms) CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
  42. SQL (7.3ms) CREATE UNIQUE INDEX `unique_schema_migrations` ON `schema_migrations` (`version`)
  43. SQL (0.8ms) SHOW TABLES
  44. SQL (0.9ms) SELECT version FROM schema_migrations
  45. Migrating to CreateUrls (1)
  46. SQL (43.5ms) CREATE TABLE `urls` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `url` varchar(255)) ENGINE=InnoDB
  47. thufir@ARRAKIS:~/projects/rss2mysql$
Add Comment
Please, Sign In to add comment