[前][次][番号順一覧][スレッド一覧]

rails:2628

From: 佐藤教子 <kyksatoh@s...>
Date: Wed, 16 Apr 2008 18:31:55 +0900
Subject: [rails:2628] loginEngineのDBが作成できない

お世話になります、佐藤と申します。
WindowsXP上にRails2.0.2,Mysqlをインストールして、LoginEngineを
使いたく思い下記を実行したのですが、rake.rbのエラーが沢山出てしまい
テーブルを作成できないでいます。
ファイル設定と、ruby script\aboutは下記にあります。
どうしたら、解決できますでしょうか?
宜しくお願い致します。

C:\kyk_project\shopping>rake db:migrate:engines:login_engine --trace
(in C:/kyk_project/shopping)
rake aborted!
Don't know how to build task 'db:migrate:engines:login_engine'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1634:in `[]'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1930:in `invoke_task'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in 
`standard_exceptio
n_handling'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in 
`standard_exceptio
n_handling'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
C:/ruby/bin/rake:19:in `load'
C:/ruby/bin/rake:19



C:\kyk_project\shopping\config\environment.rb
require File.join(RAILS_ROOT, "vendor", "plugins", "engines", "lib", 
"engines", "deprecated_config_support")

Rails::Initializer.run do |config|
  # 最初にEnginesを指定してロードし、他にも読み込む必要があれば後ろに追記する。 

  #config.plugins = [ "engines", "*" ]
  #または
  config.plugins = [ "engines", "login_engine" ]
end

module LoginEngine
  config :salt, "your-salt-here"
  config :user_email_notification, false
  config :user_table, "users"
end

C:\kyk_project\shopping\app\controllers\application.rb
require 'login_engine'
  include LoginEngine
  helper :user
  model :user
  before_filter :login_required

C:\kyk_project\shopping\app\helpers\application_helper.rb
module ApplicationHelper
  include LoginEngine
end

C:\kyk_project\shopping\vendor\plugins\login_engine\db\migrate\001_initial_schema.rb
class InitialSchema < ActiveRecord::Migration
  def self.up
    create_table LoginEngine.config(:user_table), :force => true do |t|
      t.column "login", :string, :limit => 80, :default => "", :null => 
false
      t.column "salted_password", :string, :limit => 40, :default => "", 
:null => false
      t.column "email", :string, :limit => 60, :default => "", :null => 
false
      t.column "firstname", :string, :limit => 40
      t.column "lastname", :string, :limit => 40
      t.column "salt", :string, :limit => 40, :default => "", :null => false
      t.column "verified", :integer, :default => 0
      t.column "role", :string, :limit => 40
      t.column "security_token", :string, :limit => 40
      t.column "token_expiry", :datetime
      t.column "created_at", :datetime
      t.column "updated_at", :datetime
      t.column "logged_in_at", :datetime
      t.column "deleted", :integer, :default => 0
      t.column "delete_after", :datetime
    end
  end

  def self.down
    drop_table LoginEngine.config(:user_table)
  end
end

C:\kyk_project\shopping>ruby script\about
Ruby version              1.8.6 (i386-mswin32)
RubyGems version          1.1.0
Rails version             2.0.2
Active Record version     2.0.2
Action Pack version       2.0.2
Active Resource version   2.0.2
Action Mailer version     2.0.2
Active Support version    2.0.2
Application root          C:/kyk_project/shopping
Environment               development
Database adapter          mysql
Database schema version   4



--
ML: rails@r...
使い方: http://QuickML.com/

[前][次][番号順一覧][スレッド一覧]

->    2628 2008-04-16 11:31 [kyksatoh@s...       ] loginEngineのDBが作成できない           
      2629 2008-04-16 13:10 ┣[someeda@g...        ]                                       
      2630 2008-04-16 13:58 ┗[sugi@n...           ]                                       
      2631 2008-04-16 14:31  ┗[kyksatoh@s...       ]                                     
      2633 2008-04-17 18:52   ┗[kyksatoh@s...       ] 2つ以上のプロジェクトを同時に動かせるのか?
      2634 2008-04-17 19:40    ┗[sugi@n...           ]                                 
      2640 2008-04-21 01:26     ┗[sugi@n...           ]                               
      2641 2008-04-21 03:36      ┗[kyksatoh@s...       ]