Note that there are some explanatory texts on larger screens.

plurals
  1. PORails on server syntax error?
    primarykey
    data
    text
    <p>I am trying to get my rails application running on my web server, but when I run the rake db:migrate I get the following error:</p> <p>r</p> <pre><code>oot@oak [/home/macandco/rails_apps/survey_manager]# rake db:migrate (in /home/macandco/rails_apps/survey_manager) == Baseapp: migrating ======================================================== -- create_table(:settings, {:force=&gt;true}) -&gt; 0.0072s -- create_table(:users) -&gt; 0.0072s -- add_index(:users, :login, {:unique=&gt;true}) -&gt; 0.0097s -- create_table(:profiles) -&gt; 0.0084s -- create_table(:open_id_authentication_associations, {:force=&gt;true}) -&gt; 0.0067s -- create_table(:open_id_authentication_nonces, {:force=&gt;true}) -&gt; 0.0064s -- create_table(:roles) -&gt; 0.0052s -- create_table(:roles_users, {:id=&gt;false}) -&gt; 0.0060s rake aborted! An error has occurred, all later migrations canceled: 555 5.5.2 Syntax error. g9sm2526951gvc.8 </code></pre> <p>Has anyone come across this before?</p> <p>Thanks,</p> <p>Danny</p> <p>Main Migration file</p> <p>c</p> <pre><code>lass Baseapp &lt; ActiveRecord::Migration def self.up # Create Settings Table create_table :settings, :force =&gt; true do |t| t.string :label t.string :identifier t.text :description t.string :field_type, :default =&gt; 'string' t.text :value t.timestamps end # Create Users Table create_table :users do |t| t.string :login, :limit =&gt; 40 t.string :identity_url t.string :name, :limit =&gt; 100, :default =&gt; '', :null =&gt; true t.string :email, :limit =&gt; 100 t.string :mobile t.string :signaturenotes t.string :crypted_password, :limit =&gt; 40 t.string :salt, :limit =&gt; 40 t.string :remember_token, :limit =&gt; 40 t.string :activation_code, :limit =&gt; 40 t.string :state, :null =&gt; :false, :default =&gt; 'passive' t.datetime :remember_token_expires_at t.string :password_reset_code, :default =&gt; nil t.datetime :activated_at t.datetime :deleted_at t.timestamps end add_index :users, :login, :unique =&gt; true # Create Profile Table create_table :profiles do |t| t.references :user t.string :real_name t.string :location t.string :website t.string :mobile t.timestamps end # Create OpenID Tables create_table :open_id_authentication_associations, :force =&gt; true do |t| t.integer :issued, :lifetime t.string :handle, :assoc_type t.binary :server_url, :secret end create_table :open_id_authentication_nonces, :force =&gt; true do |t| t.integer :timestamp, :null =&gt; false t.string :server_url, :null =&gt; true t.string :salt, :null =&gt; false end create_table :roles do |t| t.column :name, :string end # generate the join table create_table :roles_users, :id =&gt; false do |t| t.column :role_id, :integer t.column :user_id, :integer end # Create admin role and user admin_role = Role.create(:name =&gt; 'admin') user = User.create do |u| u.login = 'admin' u.password = u.password_confirmation = 'XXXXXXXXX' u.email = 'danny@XXXXXXX.co.uk' end user.register! user.activate! user.roles &lt;&lt; admin_role end def self.down # Drop all BaseApp drop_table :settings drop_table :users drop_table :profiles drop_table :open_id_authentication_associations drop_table :open_id_authentication_nonces drop_table :roles drop_table :roles_users end end </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload