# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20141201145107) do
create_table "users", force: true do |t|
t.string "name"
t.string "email"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "password_digest"
end
add_index "users", ["email"], name: "index_users_on_email", unique: true
end
Op maandag 1 december 2014 16:48:44 UTC+1 schreef Walter Lee Davis:
It may have been renamed since the example I looked at. I haven't used 4.2 yet. (Okay, just checked, and it is the way you describe -- same version, even -- in 4.1. Sorry for the noise.)
Walter
On Dec 1, 2014, at 10:44 AM, Roelof Wobben <rwo...@hotmail.com> wrote:
> I have exactly what Hartl says.
>
> He says to change my gem file to this :
>
> source 'https://rubygems.org'
>
>
>
> gem 'rails', '4.2.0.rc1'
> gem 'bcrypt', '3.1.7'
>
>
> And there is no mention about bcrypt-rubt
>
> Roelof
>
>
>
> Op maandag 1 december 2014 16:40:41 UTC+1 schreef Walter Lee Davis:
>
> On Dec 1, 2014, at 10:32 AM, Roelof Wobben <rwo...@hotmail.com> wrote:
>
> > Hello,
> >
> > I did all the steps from the Hartl tutorial but as soon as I do this :
> >
> > User.create(name: "Michael Hartl", email: "mha...@example.com",password: "foobar", password_confirmation: "foobar")
> >
> > on the rails console, I see this error message :
>
> Make sure that your Gemfile looks EXACTLY the same as Señor Hartl's. I am betting you are missing the bcrypt library. (It's commented out in a default `rails new` generated site.
>
> # To use ActiveModel has_secure_password
> # gem 'bcrypt-ruby', '~> 3.0.0'
>
>
> Walter
>
> > NoMethodError: undefined method `password_digest=' for #<User:0x00000004489fc8>
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activemodel-4.2. 0.beta4/lib/active_model/ attribute_methods.rb:435:in `method_missing'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activemodel-4.2. 0.beta4/lib/active_model/ secure_password.rb:125:in `password='
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4. 2.0.beta4/lib/active_record/ attribute_assignment.rb:54:in `public_send'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4. 2.0.beta4/lib/active_record/ attribute_assignment.rb:54:in `_assign_attribute'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4. 2.0.beta4/lib/active_record/ attribute_assignment.rb:41:in `block in assign_attributes'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4. 2.0.beta4/lib/active_record/ attribute_assignment.rb:35:in `each'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4. 2.0.beta4/lib/active_record/ attribute_assignment.rb:35:in `assign_attributes'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4. 2.0.beta4/lib/active_record/ core.rb:556:in `init_attributes'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4. 2.0.beta4/lib/active_record/ core.rb:277:in `initialize'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4. 2.0.beta4/lib/active_record/ inheritance.rb:61:in `new'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4. 2.0.beta4/lib/active_record/ inheritance.rb:61:in `new'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activerecord-4. 2.0.beta4/lib/active_record/ persistence.rb:33:in `create'
> > from (irb):4
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/railties-4.2.0. beta4/lib/rails/commands/ console.rb:110:in `start'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/railties-4.2.0. beta4/lib/rails/commands/ console.rb:9:in `start'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/railties-4.2.0. beta4/lib/rails/commands/ commands_tasks.rb:68:in `console'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/railties-4.2.0. beta4/lib/rails/commands/ commands_tasks.rb:39:in `run_command!'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/railties-4.2.0. beta4/lib/rails/commands.rb: 17:in `<top (required)>'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4. 2.0.beta4/lib/active_support/ dependencies.rb:252:in `require'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4. 2.0.beta4/lib/active_support/ dependencies.rb:252:in `block in require'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4. 2.0.beta4/lib/active_support/ dependencies.rb:237:in `load_dependency'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4. 2.0.beta4/lib/active_support/ dependencies.rb:252:in `require'
> > from /home/ubuntu/workspace/sample_app/bin/rails:8:in `<top (required)>'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4. 2.0.beta4/lib/active_support/ dependencies.rb:246:in `load'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4. 2.0.beta4/lib/active_support/ dependencies.rb:246:in `block in load'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4. 2.0.beta4/lib/active_support/ dependencies.rb:237:in `load_dependency'
> > from /usr/local/rvm/gems/ruby-2.1.4@rails4/gems/activesupport-4. 2.0.beta4/lib/active_support/ dependencies.rb:246:in `load'
> > from /usr/local/rvm/rubies/ruby-2.1.4/lib/ruby/site_ruby/2.1.0/ rubygems/core_ext/kernel_ require.rb:54:in `require'
> > from /usr/local/rvm/rubies/ruby-2.1.4/lib/ruby/site_ruby/2.1.0/ rubygems/core_ext/kernel_ require.rb:54:in `require'
> >
> > Roelof
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com .
> > To post to this group, send email to rubyonra...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .13a9046e-8e2f-4472-84db- 0e06849f3db3%40googlegroups. com
> > For more options, visit https://groups.google.com/d/optout .
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com .
> To post to this group, send email to rubyonra...@googlegroups.com .
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .6cb54d90-22ad-4ae8-a690- ea68289da66d%40googlegroups. com
> For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ef04b673-7c78-47ec-8402-597c38d3d5b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment