IM at chapter 2 exercises and then he asked if you can try this :

class User < ActiveRecord::Base

    has_many :microposts

    validates FILL_IN, presence: true
    validates FILL_IN, presence: true

end

but as soon as I do rails s I see this error messages :


Started GET "/users/4" for 82.74.205.109 at 2014-11-28 13:55:51 +0000
Processing by UsersController#show as HTML
   Parameters: {"id"=>"4"}
   User Load (0.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = ?
LIMIT 1 [["id", 4]]
   Rendered users/show.html.erb within layouts/application (1.3ms)
Completed 200 OK in 116ms (Views: 98.6ms | ActiveRecord: 0.4ms)

Started GET "/users" for 82.74.205.109 at 2014-11-28 13:55:53 +0000
Processing by UsersController#index as HTML
   User Load (0.3ms) SELECT "users".* FROM "users"
   Rendered users/index.html.erb within layouts/application (4.7ms)
Completed 200 OK in 122ms (Views: 120.1ms | ActiveRecord: 0.3ms)

Started GET "/" for 82.74.205.109 at 2014-11-28 13:56:15 +0000
Processing by UsersController#index as HTML
Completed 500 Internal Server Error in 7ms
NameError (uninitialized constant User::FILL_IN):
   app/models/user.rb:5:in `<class:User>'
   app/models/user.rb:1:in `<top (required)>'
   app/controllers/users_controller.rb:7:in `index'

   Rendered
/usr/local/rvm/gems/ruby-2.1.4@rails4/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates/rescues/_source.erb
(6.7ms)
   Rendered
/usr/local/rvm/gems/ruby-2.1.4@rails4/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates/rescues/_trace.html.erb
(3.9ms)
   Rendered
/usr/local/rvm/gems/ruby-2.1.4@rails4/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates/rescues/_request_and_response.html.erb
(1.6ms)
   Rendered
/usr/local/rvm/gems/ruby-2.1.4@rails4/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates/rescues/_web_console.html.erb
(1.2ms)
   Rendered
/usr/local/rvm/gems/ruby-2.1.4@rails4/gems/web-console-2.0.0.beta3/lib/action_dispatch/templates/rescues/diagnostics.html.erb
within rescues/layout (143.2ms)

Is this a error in the tutorial or have I done something wrong ?

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-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/bc6cc131-8c0a-4ee5-ad2d-c44e4f31e874%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Colin Law at Nov 28, 2014 at 2:06 pm

    On 28 November 2014 at 14:00, Roelof Wobben wrote:
    IM at chapter 2 exercises and then he asked if you can try this :

    class User < ActiveRecord::Base

    has_many :microposts

    validates FILL_IN, presence: true
    validates FILL_IN, presence: true

    end

    but as soon as I do rails s I see this error messages :
    I have not looked, but is it possible that you are supposed to fill
    that bit yourself?

    Colin

    --
    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/CAL%3D0gLuOmF1SnFtf2S05OVVVCrQkp1B1GWCfknNsC6dzck6kfg%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Roelof Wobben at Nov 28, 2014 at 7:18 pm
    You are right.

    Next time I wil do this sorts of things when I have more time.

    Roelof


    Op vrijdag 28 november 2014 15:06:32 UTC+1 schreef Colin Law:
    On 28 November 2014 at 14:00, Roelof Wobben <rwo...@hotmail.com
    <javascript:>> wrote:
    IM at chapter 2 exercises and then he asked if you can try this :

    class User < ActiveRecord::Base

    has_many :microposts

    validates FILL_IN, presence: true
    validates FILL_IN, presence: true

    end

    but as soon as I do rails s I see this error messages :
    I have not looked, but is it possible that you are supposed to fill
    that bit yourself?

    Colin
    --
    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/a7e93ecf-1519-4dac-bffb-469af136425a%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Colin Law at Nov 28, 2014 at 8:23 pm

    On 28 November 2014 at 19:18, Roelof Wobben wrote:
    You are right.

    Next time I wil do this sorts of things when I have more time.
    If you mean that you are not going to do the exercises because you do
    not have enough time then that may be a false way of saving time. It
    is not until you try the exercises that you know whether you have
    understood the concepts.

    Colin
    Roelof


    Op vrijdag 28 november 2014 15:06:32 UTC+1 schreef Colin Law:
    On 28 November 2014 at 14:00, Roelof Wobben wrote:
    IM at chapter 2 exercises and then he asked if you can try this :

    class User < ActiveRecord::Base

    has_many :microposts

    validates FILL_IN, presence: true
    validates FILL_IN, presence: true

    end

    but as soon as I do rails s I see this error messages :
    I have not looked, but is it possible that you are supposed to fill
    that bit yourself?

    Colin
    --
    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/a7e93ecf-1519-4dac-bffb-469af136425a%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/CAL%3D0gLvQZCt4d5eoQGiL20CjjfHpjfgBsnBg63A-mibH9UA%3DwQ%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Roelof Wobben at Nov 28, 2014 at 8:52 pm
    No,

    I mean that I do not do the exercises if have for example 10 minutes free
    time.

    Roelof


    Op vrijdag 28 november 2014 21:24:17 UTC+1 schreef Colin Law:
    On 28 November 2014 at 19:18, Roelof Wobben <rwo...@hotmail.com
    <javascript:>> wrote:
    You are right.

    Next time I wil do this sorts of things when I have more time.
    If you mean that you are not going to do the exercises because you do
    not have enough time then that may be a false way of saving time. It
    is not until you try the exercises that you know whether you have
    understood the concepts.

    Colin
    Roelof


    Op vrijdag 28 november 2014 15:06:32 UTC+1 schreef Colin Law:
    On 28 November 2014 at 14:00, Roelof Wobben wrote:
    IM at chapter 2 exercises and then he asked if you can try this :

    class User < ActiveRecord::Base

    has_many :microposts

    validates FILL_IN, presence: true
    validates FILL_IN, presence: true

    end

    but as soon as I do rails s I see this error messages :
    I have not looked, but is it possible that you are supposed to fill
    that bit yourself?

    Colin
    --
    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 <javascript:>.
    To post to this group, send email to rubyonra...@googlegroups.com
    <javascript:>.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/rubyonrails-talk/a7e93ecf-1519-4dac-bffb-469af136425a%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/95d77f87-e415-4a48-87bd-af2dad4af696%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedNov 28, '14 at 2:00p
activeNov 28, '14 at 8:52p
posts5
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Roelof Wobben: 3 posts Colin Law: 2 posts

People

Translate

site design / logo © 2021 Grokbase