This creation of files as root is an unfortunate problem, and it will
probably start affecting lots of Rails 2.1 projects, since the new gem
dependency machinery means many people will be typing "sudo rake
gems:install" first thing. As a workaround, I'll update the Insoshi
install script to touch the relevant files as a non-root user. It
should be pushed up to GitHub by the end of the day.
N.B. This discussion thread currently applies only to Insoshi edge.
Catching little details like this is exactly why we have an edge
version. (Thanks, Evan!) Installing from the master branch should
still work fine.
Michael
On Wed, Jul 16, 2008 at 11:30 PM, Long Nguyen <[EMAIL PROTECTED]> wrote:
> Thanks for bringing this to our attention.
>
> It looks like both files are actually being created during the first rake
> command ("sudo rake gems:install").
>
> The log file creation is standard for the handling more detailed output from
> the rake command.
>
> As far as db/development.sqlite3, I'm guessing that rake is connecting up to
> the database even though the gems:install task by itself shouldn't require
> it. This may be due to initializers or interactions with the plug-ins.
> (You can check to see if you see any kind activity in the development.log.)
>
> You can work around this by touching these files before running
> script/install:
>
> touch log/development.log
> touch db/development.sqlite3
>
> FYI, if you create a new rails app, you'll see that it also pre-creates the
> various runtime log files. Might be something to consider adding to the
> install script.
>
> The database file is a little trickier since it would have to know that
> you're using sqlite3 as opposed to mysql or postgresql.
>
> Long
>
>
> On Wed, Jul 16, 2008 at 5:53 PM, Evan Dorn <[EMAIL PROTECTED]> wrote:
>>
>> When I clone the repository and run script/install (just using the
>> default database.example as database.yml), it creates log/
>> development.log and db/development.sqlite3 as owned by "root". This
>> then causes permissions issues later in the install process.
>>
>> I have to manually chown those two files back to me and then run rake
>> db:migrate and rake db:test:prepare rather than let the install script
>> do it.
>>
>> Any reason why it would do this? When I look at the contents of
>> script/install, only the gem install is run via sudo. The second
>> command, rake install, seems to be inheriting the sudo somehow,
>> however.
>>
>> Thanks,
>> Evan
>>
>>
>
>
>
> --
> Long Nguyen
> [EMAIL PROTECTED]
> >
>
--
Michael Hartl
Insoshi social software
http://insoshi.com/
--~--~---------~--~----~------------~-------~--~----~
Insoshi developer site: http://dogfood.insoshi.com/
Insoshi documentation: http://docs.insoshi.com/
You received this message because you are subscribed to the Google
Groups "Insoshi" 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/insoshi?hl=en
-~----------~----~----~----~------~----~------~--~---