reset your admin password: ActiveRecord::StatementInvalid: Could not find table 'users'

167 views
Skip to first unread message

tyon

unread,
May 26, 2015, 4:11:18 PM5/26/15
to radia...@googlegroups.com
Hi all!

I need to reset my admin password, but I'm getting the following error:

utyon@utyon:~/dentalcarehb$ script/console production
NOTE
: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/rails-2.3.18/lib/rails/gem_dependency.rb:21.
Loading production environment (Rails 2.3.18)
NOTE
: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/rails-2.3.18/lib/rails/gem_dependency.rb:21.
/home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-2.3.18/lib/active_support/inflector.rb:3:in `<top (required)>': iconv will be deprecated in the future, use String#encode instead.
>> user = User.find_by_login('admin')
ActiveRecord::StatementInvalid: Could not find table 'users'
    from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-2.3.18/lib/active_record/connection_adapters/sqlite3_adapter.rb:29:in `
block in table_structure'
    from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-2.3.18/lib/active_record/connection_adapters/sqlite3_adapter.rb:28:in `tap'

   
from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-2.3.18/lib/active_record/connection_adapters/sqlite3_adapter.rb:28:in `table_structure'
    from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-2.3.18/lib/active_record/connection_adapters/sqlite_adapter.rb:228:in `
columns'
    from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-2.3.18/lib/active_record/base.rb:1305:in `columns'

   
from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-2.3.18/lib/active_record/base.rb:1318:in `column_names'
    from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-2.3.18/lib/active_record/base.rb:1331:in `
column_methods_hash'
    from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-2.3.18/lib/active_record/base.rb:2029:in `block in all_attributes_exists?'

   
from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-2.3.18/lib/active_record/base.rb:2029:in `each'
    from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-2.3.18/lib/active_record/base.rb:2029:in `
all?'
    from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-2.3.18/lib/active_record/base.rb:2029:in `all_attributes_exists?'

   
from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/activerecord-2.3.18/lib/active_record/base.rb:1876:in `method_missing'
    from /home/utyon/.rvm/gems/ruby-1.9.3-p551/gems/will_paginate-2.3.16/lib/will_paginate/finder.rb:170:in `
method_missing_with_paginate'
    from (irb):1
    from /home/utyon/.rvm/rubies/ruby-1.9.3-p551/bin/irb:12:in `<main>'



I'd appreciate any advise.

Thanks!

Andrew vonderLuft

unread,
May 26, 2015, 4:20:59 PM5/26/15
to radia...@googlegroups.com, sofia.sa...@gmail.com
Try `bundle exec ./script/console production`

Brian 'Phunk' Gadoury

unread,
May 26, 2015, 5:26:47 PM5/26/15
to radia...@googlegroups.com
The stack-trace shows it is trying to connect to a sqlite3 database. If
your Radiant installation is not using a sqlite3 database, then it looks
like your config/database.yml is configured incorrectly for production
mode.

-Phunk
Reply all
Reply to author
Forward
0 new messages