Kevin: Thanks for the tip. adding accessible => true enabled me to
migrate the DB where I couldn't before.
Matt: I put the FK on archives because I was grasping at straws.
Here's where it gets REALLY weird. After migrating the DB I fired up
Webrick => same error. I decided to REALLY grasp at straws and
install Apache2 / Passenger [ to go with plain old ruby -- not REE ].
I was able to pull up the site just fine with Apache after that. For
giggles, I commented out the accessible => true part, and it still
loads with Apache/Pass, but still not with Webrick. I was also able
to migrate the DB with it commented out. FWIW, I also recently did
the tutorial, and found flakey results when I ran it with Webrick,
i.e. transient errors that prevented it from loading at all,
sometimes. I'm not sure what to make of all that, except to skip
webrick.
Now that I can pull up the site, I see that the auto_actions_for
declaration doesn't automatically give me the inline forms, i.e.
create a new archive for the workspace. I just got the h2 headline
and a save button, but no fields. From looking at the docs, I see
that the dependent => :destroy declaration is gone in favor or
viewHints. I erased the old and created the following file in a dir
called app/viewhints:
class WorkspaceHints < Hobo::ViewHints
children :playlist, :archive
end
I did the same for the other models. Still, no working in line forms.
Still just a headline and a save button. There's still ample room for
me to root through the docs on this. At the same time, I thought I'd
ask if you have any hints?
Thanks for the help! Paul
On Jan 21, 2:15 pm, Matt Jones <[email protected]> wrote:
> On Jan 21, 2010, at 5:01 PM, Me wrote:
>
>
>
>
>
> > Greetings. I built an app sometime back with Hobo 0.8.3 and rails
> > 2.1.1 on Ubuntu Hardy. That machine is now defunct. I'm trying to
> > re-
> > deploy it with 0.9.103 on an Ubuntu Jaunty machine with rails 2.3.5.
> > I've overcome a few gotchas, but this one has me stumped:
>
> > model_router.rb:176:in `owner_routes': Hob routing error -- can't find
> > reverse association for Archive#workspace (e.g. the :has_many that
> > corresponds to a :belongs_to) (HoboError)
>
> > From searching the archives, the solution each time was to correct
> > errors in the association itself. In my case, I can't find what I did
> > wrong. At the same time, it used to work. This is the association
> > that used to be valid:
>
> > archive.rb
> > belongs_to :workspace
>
> > workspace.rb
> > has_many :archives, :foreign_key =>
> > "workspace_id"
>
> > In archive_controller.rb :
> > auto_actions :all, :except => :index
> > auto_actions_for :workspace, [:new]
>
> > I tried adding the FK to the archive.rb belongs_to half, but it didn't
> > help. I also tried downgrading to rails 2.2.2, but got the same error.
> > Does anyone know what I did wrong?
>
> Really weird - I can't see anything that would be causing problems. Is
> there a particular reason why you're specifying :foreign_key
> on :archives? The value you're passing is the same as what Rails would
> select by default.
>
> --Matt Jones
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" 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 this group at
http://groups.google.com/group/hobousers?hl=en.