On 18 September 2012 04:00, jose ramirez <[email protected]> wrote:
> Hi! First of all, this is my first application on Rails, and i'm stuck at a
> migration. i created a demo app (the demo_app from michael hartl's tutorial)
> as usual: rails new demo_app, rails generate scaffold User name:string
> email:string, and when i do rake db:migrate, this stack appears:
>
> rake db:migrate --trace
> ** Invoke db:migrate (first_time)
> ** Invoke environment (first_time)
> ** Execute environment
> ** Invoke db:load_config (first_time)
> ** Execute db:load_config
> ** Execute db:migrate
> rake aborted!
> NoMethodError: undefined method `to_a' for #<SQLite3::Statement:0x9d6a2dc>:
> SELECT name
>           FROM sqlite_master
>           WHERE type = 'table' AND NOT name = 'sqlite_sequence'
>  AND name = "schema_migrations"
> ....
>
> This is the Gemfile:
>
> source 'https://rubygems.org'
>
> gem 'rails', '3.2.8'
>
> # Bundle edge Rails instead:
> # gem 'rails', :git => 'git://github.com/rails/rails.git'
>
> gem 'sqlite3'
> gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'

Are those the versions  of rails (3.2.8) and sqlite3-ruby that the
tutorial expects?  I don't know but I suspect that a later version of
sqlite3-ruby might fix it.  Googling for the error message finds this
for example
http://stackoverflow.com/questions/8604360/rails-3-rake-dbmigrate-fails-with-a-rake-aborted-cant-convert-sqlite3state

Colin

>
> # Gems used only for assets and not required
> # in production environments by default.
> group :assets do
>   gem 'sass-rails',   '~> 3.2.3'
>   gem 'coffee-rails', '~> 3.2.1'
>
>   # See https://github.com/sstephenson/execjs#readme for more supported
> runtimes
>   # gem 'therubyracer', :platforms => :ruby
>
>   gem 'uglifier', '>= 1.0.3'
> end
>
> gem 'jquery-rails'
>
> # To use ActiveModel has_secure_password
> # gem 'bcrypt-ruby', '~> 3.0.0'
>
> # To use Jbuilder templates for JSON
> # gem 'jbuilder'
>
> # Use unicorn as the app server
> # gem 'unicorn'
>
> # Deploy with Capistrano
> # gem 'capistrano'
>
> # To use debugger
> # gem 'debugger'
>
> Any pointer to something i missed, or something wrong,  will be highly
> appreciated. If you need any additional info in order to help, please ask,
> :)a
>
> --
> 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 [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/mK9VVljoF2AJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to