Error "Could not find generator hobo:migrate"

64 views
Skip to first unread message

jhstephenson

unread,
Apr 20, 2012, 12:01:08 AM4/20/12
to hobo...@googlegroups.com
I am going through the project tutorial in "Rapid Rails 3 with Hobo" and have run into a problem. When I try and run "hobo g migrate" I get the error shown in the subject.

Being a newby to this I have absolutely no idea where to even start looking for this.

Can someone point me in the right direction?

Thanks,
Jim

Bryan Larsen

unread,
Apr 20, 2012, 11:39:37 AM4/20/12
to hobo...@googlegroups.com
It's "hobo g migration" or "rails g hobo:migration". Is that a typo
in the book?

Bryan

> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/Dzno8UbhkfYJ.
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to
> hobousers+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/hobousers?hl=en.

jhstephenson

unread,
Apr 20, 2012, 2:03:57 PM4/20/12
to hobo...@googlegroups.com
I think that is called not reading the book right.

"hobo g migration" at starts the migration but it comes up with an error that says "...compute_type: uninitialized constant User::TasksAssignment...."

This appears when I run the migration after add "children :users" to the Task model.

Jim


On Friday, April 20, 2012 9:39:37 AM UTC-6, Bryan Larsen wrote:
It's "hobo g migration" or "rails g hobo:migration".   Is that a typo
in the book?

Bryan

On Fri, Apr 20, 2012 at 12:01 AM, jhstephenson <jste...@scc-i.com> wrote:
> I am going through the project tutorial in "Rapid Rails 3 with Hobo" and
> have run into a problem. When I try and run "hobo g migrate" I get the error
> shown in the subject.
>
> Being a newby to this I have absolutely no idea where to even start looking
> for this.
>
> Can someone point me in the right direction?
>
> Thanks,
> Jim
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/Dzno8UbhkfYJ.
> To post to this group, send email to hobo...@googlegroups.com.
> To unsubscribe from this group, send email to

> hobousers+unsubscribe@googlegroups.com.

jhstephenson

unread,
Apr 20, 2012, 6:15:12 PM4/20/12
to hobo...@googlegroups.com
After staring at this forever the problem looks to me like it is something with the task_assignment model.

The error says "......constant User::TasksAssignment..." Where is the extra 's' in the middle of TasksAssignment coming from?

This is what my User model looks like:
class User < ActiveRecord::Base

  hobo_user_model # Don't put anything above this

  fields do
    name          :string, :required, :unique
    email_address :email_address, :login => true
    administrator :boolean, :default => false
    timestamps
  end

  has_many :task_assignments, :dependent => :destroy
  has_many :tasks, :through => :task_assignments


This is what my Task_Assignment model looks like:
class TaskAssignment < ActiveRecord::Base

  hobo_model # Don't put anything above this

  fields do
    timestamps
  end

  belongs_to :user, :index => 'assignment_user_join_index'
  belongs_to :task, :index => 'assignment_task_join_index'

And  this is what my Task model looks like:
class Task < ActiveRecord::Base

  hobo_model # Don't put anything above this

  fields do
    name :string
    timestamps
  end

  belongs_to :requirement, :index => 'requirement_task_index'
  has_many :task_assignments, :dependent => :destroy
  has_many :users, :through => :task_assignments

  children :task_assignments
  children :users

kevinpfromnm

unread,
Apr 20, 2012, 9:22:18 PM4/20/12
to hobo...@googlegroups.com
Occasionally rails gets a wrong pluralization, particularly with compound word model names, and that sometimes causes some weird breaks.  You might need to specify the class name and/or the key.
Reply all
Reply to author
Forward
0 new messages