[Nitro] Updated blog example
Jimmy Jazz
Jimmy.Jazz at gmx.net
Thu Jun 28 13:12:57 EDT 2007
Thomas Leitner a écrit :
> On 26.06.2007, at 22:49, Arne Brasseur wrote:
>
>> George Moschovitis schreef:
>>
>>> Dear devs,
>>>
>>> I think I have fixed the WSOD problem in the blog example. Please
>>> pull
>>> and verify.
>>>
>> I did this :
>>
>> did a fresh
>> darcs get http://repo.nitroproject.org
>>
>> added
>> require "../../script/lib/glycerin"
>> to the beginning of app.rb
>>
>> in conf/debug.rb
>> switched :mysql to :sqlite
>> switched :mongrel to :webrick
>>
>> cd'ed to examples/blog and issued
>> ruby ../../nitro/bin/nitro
>>
>
> Yep, this also works for me. Thanks for the guide to get the example
> running! And George: Very nice job indeed!!
>
> Just one thing I want to mention: I have the following bash function
> defined in .bashrc to help execute the blog example:
>
> function nitro-devel {
> export RUBYOPT="-rubygems -I~/work/nitro/script/lib -rglycerin"
> cd ~/work/nitro
> }
>
> This allows me to do:
>
> nitro-devel
> cd ~/work/nitro/examples/blog
> ruby app.rb
>
Hello devs,
it works for me too with the RUBYOPT variable set but not without pain :)
I couldn't get it work when the database (mysql) was not installed
locally. Also, mysql-ruby gem is not needed in any case. I don't know
why it complains about it.
Even if nitro is configured to connect to a remote sql server, it will
produce and whatever you add or remove in app.rb, following the
suggestions on the mailing list:
$ ruby ../../nitro/bin/nitro
INFO: Og uses the Mysql store.
ERROR: Ruby-Mysql bindings are not installed!
ERROR: Trying to use the pure-Ruby binding included in Og
ERROR: No such file or directory - /tmp/mysql.sock
INFO: Starting Webrick adapter on 0.0.0.0:9000
INFO: Press Ctrl-C to shutdown; Run with --help for options.
DEBUG: Compiling 'index' super-method
ERROR: Error while handling '/'
ERROR: undefined local variable or method `ogmanager' for Post:Class
[...]
The problem has disappeared by itself otherwise:
$ ruby ../../nitro/bin/nitro
INFO: Og uses the Mysql store.
DEBUG: Og manageable classes: [Post, Category, Comment, Tag]
DEBUG: CREATE TABLE ogpost (`create_time` datetime, `update_time`
datetime, `access_time` datetime, `oid` CHAR(22) PRIMARY KEY, `title`
text, `body` text, `author` text, `category_oid` text)
DEBUG: CREATE TABLE ogj_post_tag ( post_oid CHAR(22) NOT NULL, tag_oid
CHAR(22) NOT NULL, PRIMARY KEY(post_oid, tag_oid) )
DEBUG: Join table already exists
DEBUG: SELECT * FROM ogpost LIMIT 1
DEBUG: SELECT * FROM ogpost LIMIT 1
DEBUG: CREATE TABLE ogcategory (`oid` CHAR(22) PRIMARY KEY, `title`
text, `description` text)
DEBUG: SELECT * FROM ogcategory LIMIT 1
[...]
Now, i keep hope alive to find a solution to my issue ;)
Thx,
Jj
--
|\ _,,,---,,_
ZZZzz /,`.-'`' -. ;-;;,_
|,4- ) )-,_. ,\ ( `'-'
'---''(_/--' `-'\_)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070628/256c29ca/attachment.html
More information about the Nitro-general
mailing list