librelist archives

« back to archive

setting up friendly (not rails)

setting up friendly (not rails)

From:
Date:
2010-02-05 @ 06:07
could not decode message

Re: [friendly] setting up friendly (not rails)

From:
Arun Thampi
Date:
2010-02-05 @ 06:34
Hi Philip - Assuming you installed Friendly as a gem, you will need to
require 'rubygems' as well if you haven't already.

Try this out: http://gist.github.com/295572

You can put the friendly configuration stuff wherever you like, as long as
you are able to require it easily (or you can put it in the same file as
your model, as in the gist above).

Hope that helps.

Cheers,
Arun

On Fri, Feb 5, 2010 at 2:07 PM, <plusgforce@gmail.com> wrote:

> Hi.  I'm having trouble with the following
> introduction to friendly at http://friendlyorm.com/.
> I am using Linux and ruby1.8 and wxruby 2.0.1.
>
> Get Friendly in 5 minutes
> Install friendly
>
> Install the gem.
> done
>
> not using Rails:
> Friendly.configure :adapter  => "mysql",
>                    :host     => "localhost",
>                    :user     => "root",
>                    :password => "swordfish",
>                    :database => "playing_with_friendly"
>
> What do I name this file?  What directory do I put it in?
> I am running Ubuntu 9.10 (Karmic Koala).
>
> Create a Model
>
> Fire up your vim:
>
>     class BlogPost
>       include Friendly::Document
>
>       attribute :author, String
>       attribute :title,  String
>       attribute :body,   String
>     end
>
> Do I need a require statement?
> require 'friendly' or
> require 'Friendly' does not seem to work.
>
> Any help will be appreciated.
>
> -Philip
>
>


-- 
It's better to be a pirate than join the Navy - Steve Jobs
http://mclov.in

Re: [friendly] setting up friendly (not rails)

From:
Date:
2010-02-06 @ 00:50
could not decode message