is pages.dryml supposed to be automatically updated for newly created hobo_model_resources?

6 views
Skip to first unread message

Edward Samokhvalov

unread,
Feb 3, 2010, 6:04:50 AM2/3/10
to Hobo Users
Hi all!

I'm creating a new resource with
sudo ./script/generate hobo_model_resource story title:string
what_happened:text

but after that I can find no update in app/views/taglibs/auto/rapid/
index.dryml
shall I add my stuff for story manually (as I do now) or it's support
to generated itself?

also when I do it manually, it would not work in all versions and
sometimes would say in log that .erb file is missing.

thx.

Owen

unread,
Feb 3, 2010, 6:36:45 AM2/3/10
to Hobo Users
That's strange. You shouldn't need to do anything. What version of
Hobo are you using?

-Owen

Patrick Fitzgerald

unread,
Feb 3, 2010, 6:48:23 AM2/3/10
to hobo...@googlegroups.com
I've only ever seen this happen on a rails app when using the
production environment. Hobo doesn't automatically recompile the
DRYML files in a production environment. You need to restart whatever
web server you are using. The first time you query a web page it will
be slow as it compiles the DRYML.

Alternatively switch to the development environment where the DRYML is
recompiled every time there is a need to.

Patrick

> --
> You received this message because you are subscribed to the Google Groups "Hobo Users" group.
> 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.
>
>

Owen

unread,
Feb 3, 2010, 8:08:05 AM2/3/10
to Hobo Users
Yes, the changes are generated the next time you run the app in Dev
mode.

You can force an update with this rake task:

\my-hobo-app> rake hobo:generate_taglibs

-Owen

Edward Samokhvalov

unread,
Feb 3, 2010, 8:22:35 AM2/3/10
to Hobo Users
oh thx Patrick! I'm in production.

so that's what I did (if someone would ahve the same problem)

sudo /etc/init.d/apache2 stop # i'm on apache through passenger


sudo ./script/generate hobo_model_resource story title:string

what_happened:text # and needed modifications in models and
controllers
sudo ./script/generate hobo_migration
rake db:migrate RAILS_ENV=development
sudo ./script/server -p80 # and tested the site going to url
killed the mongrel process
rake db:migrate RAILS_ENV=production
sudo /etc/init.d/apache2 start #and then all the neede stuff got
generated.

Matt Jones

unread,
Feb 3, 2010, 11:04:49 AM2/3/10
to hobo...@googlegroups.com

On Feb 3, 2010, at 6:04 AM, Edward Samokhvalov wrote:

> Hi all!
>
> I'm creating a new resource with
> sudo ./script/generate hobo_model_resource story title:string
> what_happened:text

Never encountered this particular problem, but why are you using sudo
for this? It seems like a recipe for permission / owner problems...

--Matt Jones

kevinpfromnm

unread,
Feb 3, 2010, 12:58:02 PM2/3/10
to Hobo Users
sudo makes sense for apache start but not the generation or dev server

Edward Samokhvalov

unread,
Feb 4, 2010, 1:59:08 AM2/4/10
to Hobo Users
It seems that I do have some perms prob now...
that's the issue http://groups.google.com/group/hobousers/t/2dbec7b086a0ad77

i did though change the permission of files with chown to the same
user as others, but may it be that the db has created a table that can
be accessed only by admin?

kevinpfromnm

unread,
Feb 4, 2010, 4:17:02 PM2/4/10
to Hobo Users
No, the db info gets pulled from config/database.yml so running a
process as a different user shouldn't affect the db. I'd be inclined
to check it's only the particular environment that has the issue and/
or if the particular environment is behind on migrations.

On Feb 3, 11:59 pm, Edward Samokhvalov <a0b0c0d...@gmail.com> wrote:
> It seems that I do have some perms prob now...

> that's the issuehttp://groups.google.com/group/hobousers/t/2dbec7b086a0ad77

Reply all
Reply to author
Forward
0 new messages