<    March 2010    >
Su Mo Tu We Th Fr Sa
    1  2  3  4  5  6
 7  8  9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
00:26 damnpepe joined
00:26 mr-rock joined
01:08 khaase joined
01:08 russm left
01:19 pdelgallego joined
01:25 damnpepe joined
01:26 ph^ joined
01:28 RichGuk joined
01:39 crohr joined
01:48 rob_ joined
01:48 <rob_> hi
01:49 <rob_> how do i go about doing relative paths in sinatra? im running my application as a cgi script under an unknown directory..
01:52 johnny left
02:15 arnaudsj joined
02:16 johnny joined
02:23 giskard joined
02:24 hipe joined
02:26 benlovell joined
02:30 hipe joined
02:32 fbru02_ joined
02:41 beawesomeinstead joined
02:47 arnaudsj left
02:50 khaase joined
02:53 mitkok joined
03:14 RichGuk joined
03:15 qwerxy joined
03:19 RichGuk joined
03:55 khaase joined
03:59 julienXX joined
04:03 ph^ joined
04:04 erthad joined
04:06 ph^ joined
04:31 <namelessjon> rob_: I have some helpers I use for situations like that: http://github.com/namelessjon/notable/blob/master/lib/notable/app.rb#L12-29
04:44 hipertracker joined
04:46 khaase joined
04:59 khaase joined
05:04 fbru02 joined
05:08 rsterner joined
05:09 gma joined
05:21 anatoo_ joined
05:23 foca_ joined
05:25 hyperspa1e joined
05:25 rob___ joined
05:25 sr_ joined
05:29 flexd joined
05:29 cpjolicoeur joined
05:30 halorgium joined
05:44 kristopher joined
05:44 muescha joined
05:45 ylluminate joined
06:04 hassox joined
06:46 ph^_ joined
06:49 soveran joined
06:51 rmontgomery429 joined
06:53 namelessjon joined
06:58 namelessjon joined
07:03 djanowski joined
07:10 ph^_ joined
07:14 <rmontgomery429> zamous: http://iamneato.com/2009/08/01/rspec-and-sinatra-quick-start
07:17 cfurrow joined
07:21 tbuehlmann joined
07:25 josephholsten joined
07:36 stouset joined
07:38 jashkenas joined
07:40 stepheneb joined
07:43 <jashkenas> 'morning #sinatra. What's the current story with using Sinatra together with ActiveRecord 2.3.5?
07:43 <jashkenas> Sinatra requires Rack, Rack 1.1.0 isn't compatible with ActiveRecord 2.3.5 (claims ActiveRecord)
07:44 <jashkenas> So you get the gem mismatch bugaboo, and I was wondering how y'all are sidestepping it.
07:46 <jashkenas> Context: https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3685-actionpack-235-gem-declares-incompatibility-with-rack-110
07:48 jhenderson joined
07:48 <cypher23> jashkenas, I don't use Sinatra w/ ActiveRecord, but you might try editing the gemfiles and change the dependecy, as described in the ticket comments
07:48 quirkey joined
07:50 quirkey joined
07:51 khaase joined
07:52 quirkey joined
07:57 ylluminate joined
07:59 stouset joined
08:00 quirkey joined
08:02 jashkenas left
08:03 quirkey joined
08:04 ph^_ joined
08:10 <cfurrow> jashkenas: I've been using Sinatra w/ DataMapper for the past few days, and it's gone pretty well.
08:16 mjw2 joined
08:24 ph^_ joined
08:47 <rmontgomery429> +1 for DataMapper and Sinatra.
08:50 gma joined
08:51 docelic joined
08:52 <soveran> sr_: ping
08:55 ujihisa joined
08:56 hipe joined
09:01 lala joined
09:06 dancroak joined
09:10 yawniek joined
09:46 r11t joined
09:46 djanowski joined
09:51 r11t joined
09:52 djanowski joined
09:55 r11t_ joined
09:56 drev1 joined
10:07 johnny left
10:09 johnny joined
10:11 hadees joined
10:15 thefifthcircuit joined
10:16 coderdad joined
10:16 johnny left
10:21 joeconyers joined
10:25 johnny joined
11:08 giskard joined
11:10 levifig joined
11:12 bleything joined
11:12 hrvojehr joined
11:25 bdimcheff joined
11:34 zodiak joined
11:41 zodiak joined
11:48 hipe joined
11:48 johnny left
11:51 hrvojehr joined
11:59 julienXX joined
12:06 johnny joined
12:07 pdelgallego joined
12:08 ylluminate joined
12:14 evan_luck joined
12:18 RichGuk joined
12:26 <sr_> soveran, pong
12:38 <soveran> sr: I was updating monk to work with 1.0 and the only issues is that settings is now a method in Sinatra::Base, but now we are thinking what to do with it.
12:38 <soveran> sr: so, we will probably change the way Monk works.
12:38 hrvojehr left
12:44 donpdonp joined
12:44 <donpdonp> im converting a geomena script into a geomena::base class. the script says 'mime :type,"code"', where does this go in the base class?
12:46 <donpdonp> the 'configure' block isnt working how it used to. http://pastie.org/877567
12:51 cylence joined
12:51 <cylence> What is the code for rendering a partial in a view using haml?
12:51 <cylence> is it simple: = haml(:partialname)
12:51 <cylence> I'm assuming not since that's giving me an error
12:52 <sr> soveran, i've been pondering this https://gist.github.com/b4c2b8c3240bd01f4a54
12:52 <cylence> or if that is correct, where should the partials be stored?
12:52 blakemizerany joined
12:52 GitHub179 joined
12:52 <GitHub179> tilt: 07master 03Justin Knowlden * 00ce3f7 (2 files in 2 dirs): Cleaned up Tilt[](ext) method because the redundancy was bothering me. Broke out some tests to be more explicit as well.
12:52 <GitHub179> tilt: 07master 03Justin Knowlden * 779c398 (1 files in 1 dirs): Adding a comment about what to expect from Tilt.registered?
12:52 <GitHub179> tilt: 07master commits 4ee7afa...779c398 - http://bit.ly/bdZBf7
12:52 GitHub179 left
12:52 <cylence> wow, just answered my own question. thank you
12:52 pedrobelo joined
12:53 <cylence> I suppose the other one I've been chewing on would be how to do multiple line bits of code in views (should I ever need to)
13:03 cpg joined
13:04 giskard joined
13:08 r11t joined
13:11 mitkok joined
13:17 <cylence> how do I do logic in a view without out putting it using haml?
13:18 <cylence> heh, this would be so easy in erb
13:31 jbrennan joined
13:33 <jbrennan> I'm trying to set up a sinatra app hosted on dreamhost, and when I cloned my git repo into the directory for my website ( website.com/ hosted by dreamhost) it ended up actually creating website.com/projectName/allmystuffhere instead.... In my config.ru file I made it point to the actual location of my sinatra_app_script.rb but when I visit the website I just get a directory listing
13:33 <jbrennan> Any ideas?
13:33 <dnyy> cylence: can you give an example, don't really get your question. ;o
13:34 <cylence> dnyy: absolutely. I resolved it another way, but I was using @thing.each { |e| puts e }
13:34 <jbrennan> oh, now I'm getting a Rack error, no such file "sinatra" in my config.ru file
13:35 <cylence> dnyy: I did this WITH the '=' at the front in the view, as I understand is necessary. but that ALSO outputs the content, so it was outputting it twice
13:35 <cylence> dnyy: I recall a way, but don't remember the exact syntax for performing logic in the view but not outputting it.
13:35 <dnyy> cylence: just don't put a =
13:35 <cylence> dnyy: it will still parse it as ruby?!
13:35 <dnyy> well, put a -
13:36 <cylence> AHHHHHHHHHHHHH
13:36 <cylence> there it is
13:36 <cylence> lol, thank you!!!
13:36 <jbrennan> Here's a paste if anyone's interested: http://pastie.org/877648
13:36 <dnyy> cylence: http://pastie.org/877650 <- & you're welcome. :p
13:36 <cylence> very nice, phew
13:36 <cylence> hehe
13:37 <dnyy> jbrennan: haven't used dreamhost in forever, but do you have mod_rails (or whatever they're using now) pointing to the right directory?
13:37 <jbrennan> I *think* so
13:38 <jbrennan> there's a checkbox for using it, and I've got it checked, but it doesn't specify a directory
13:38 <jbrennan> it seems to be recognizing my config.ru, but finds an error
13:38 ph^_ joined
13:38 <jbrennan> I've installed the Sinatra gem too
13:38 <dnyy> pointing at public?
13:39 <jbrennan> I think so. But here's the thing, my public directory is also inside that other directory. So I pointed dreamhost to that, too
13:40 <jbrennan> (and by my public directory, I mean /mysite.com/project/public/ , where project holds my sinatra script)
13:42 <jbrennan> I'm assuming dreamhost's "public" and sinatra's "public" are different things, yes?
13:42 <dnyy> jbrennan: well, you should be pointing to your apps public directory when setting up mod_rails or whatever.
13:43 cfurrow_ joined
13:43 <jbrennan> ok I'll do that
13:44 <jbrennan> So should everything sinatra related be in the same directory as where I tell dreamhost is "public" ?
13:48 <dnyy> jbrennan: http://pastie.org/877670 If this was your directory structure, you'd point to public.
13:48 <dnyy> all the ruby lives outside of that
13:49 jacius joined
13:49 <jbrennan> aha
13:50 <dnyy> wat?
13:50 <jbrennan> Just trying to reason with myself :)
13:51 <dnyy> hah, my bad if i'm misunderstanding the problem. ;p
13:56 ujihisa joined
14:03 <jbrennan> OK, now I've got all my files in the right spot, but I'm getting the same error, Rack can't find sinatra....
14:09 <donpdonp> why is mime_type an error? (tried both inside and outside configure block) http://pastie.org/877654
14:11 ko1o joined
14:12 tj- joined
14:14 hobbsc joined
14:14 skalnik joined
14:15 nitsujw joined
14:15 jacius joined
14:15 jshsu joined
14:15 mtkd joined
14:15 jeremyevans joined
14:15 ddfreyne joined
14:15 jshsu joined
14:15 MadX` joined
14:16 mattly joined
14:25 <mistergibson> anyone got a whiz-bang url regarding sinatra over thin? I was not going to run it under thin per se, but rather use some mixing thingy to go after my goals.
14:31 ko1o left
14:31 ko1o joined
14:31 ko1o left
14:33 namelessjon joined
14:47 jbrennan joined
14:52 soveran joined
14:58 atastypie joined
15:31 pdelgallego joined
15:40 <jbrennan> Can someone lend me a hand deploying this sinatra app to dreamhost? passenger can't seem to find sinatra
15:40 <jbrennan> is there a way to verify I've got the gem loaded properly?
15:44 <jbrennan> mind you, if I just run $ ruby mySinatraApp.rb on the server, it actually runs
15:50 levifig joined
16:02 hipe joined
16:04 ujihisa joined
16:05 joeconyers joined
16:13 jbrennan joined
16:13 <jbrennan> See the strange thing is, if I just run the app on the server with ruby myApp.rb then I don't get any errors
16:14 <jbrennan> but when I run with passenger, it can't find the things I required in the app itself
16:18 joeconyers joined
16:28 jshsu joined
16:36 donpdonp left
16:47 alt1 joined
16:47 hipe joined
16:59 coderdad joined
17:00 eddanger joined
17:05 fbru02_ joined
17:10 hipe joined
17:12 stepheneb joined
17:14 coderdad joined
17:14 cpg joined
17:19 markwithout joined
17:33 brainproxy joined
17:39 zodiak joined
17:46 postmodern joined
18:09 ujihisa joined
18:14 zoo-zed joined
18:22 hipe_ joined
18:26 TomV-415 joined
18:27 hadees joined
18:28 <TomV-415> Anyone had luck catching exceptions? I want to use my apps exisitng mailer to send alerts when sinatra/rack excption is raised. (get '/boom' { raise 'my silly exception } should send an email..
18:28 <TomV-415> Using 'on error' doesn't seem to work in this case.
18:30 <TomV-415> (anyone around on a sunny Friday afternoon (here in San Francisco at least..) )?
18:31 <sr> TomV-415, beautiful day heh
18:31 <sr> TomV-415, try enable :raise_errors
18:31 <TomV-415> sr: thanks - I did that but let me look at my code and whip up a gist. :-)
18:32 hadeees joined
18:48 <TomV-415> A bit of fiddling with this, but no luck - here's the code - no doubt something simple I don't yet grok.. http://gist.github.com/338369
18:49 markwithout joined
18:50 <TomV-415> do I need to be working with a Rack middleware layer to catch this error?
18:51 <sr> TomV-415, yup
18:52 <sr> checkout mailexception in rack-contrib
18:56 arnaudsj joined
18:59 <TomV-415> sr thanks, I found that before, but thought I could just use my own mailer.. I'll look at how that gets configured and work my way backwards..
19:00 <TomV-415> (there's an email thread on how to configure http://groups.google.com/group/rack-devel/browse_thread/thread/85733ecd64688c95 )
19:01 <sr> TomV-415, you could. i was talking of the technique. rack/contrib/mailexception uses
19:11 <soveran> sr: late reply: I like the idea of local settings
19:16 thefifthcircuit joined
19:25 ylluminate joined
19:32 <TomV-415> sr: I'm still fiddling... can't get the mailexception to connect.. but I'll look more closely at the implementaion as you suggest and go from there.. Thanks.
19:36 <mistergibson> anyone work with thin and sinatra before? I'm a n00b looking to cobble some bit together
19:37 <mistergibson> it appears the thin docs are scattered hither, thither and yon ... but you have any favorite urls, any help would be apprecitated
19:37 <mistergibson> err... appreciated
19:38 <harryv> what do you need?
19:40 <mistergibson> I am looking to use sinatra over thin withing a module (not running via thin), to integrate with eventmachine
19:41 <harryv> take a look at the source, in examples/
19:41 <harryv> examples/adapter.rb e.g.
19:41 <mistergibson> ok, thanks
19:44 <mistergibson> I don't see examples in github
19:45 <harryv> http://github.com/macournoyer/thin/tree/master/example/
19:46 <mistergibson> ok, thanks
19:47 <mistergibson> (looking at wrong project)
19:52 stepheneb joined
20:01 mattly joined
20:09 <mistergibson> ok
20:09 <mistergibson> that's pretty cool
20:15 ylluminate joined
20:18 bdimcheff joined
20:51 benschwarz joined
21:01 flexd_ joined
21:03 arnaudsj left
21:03 ylluminate joined
21:09 pedrobelo joined
21:14 <TomV-415> sr: I'm looking at the rack/contrib/mailexception -- why does the send_notification get called 2 times in the call method (lines 39 and 42) (http://github.com/rack/rack-contrib/blob/master/lib/rack/contrib/mailexceptions.rb )
21:14 <TomV-415> The one on line 42 confuses me.
21:16 <sr> TomV-415, it'll send whatever you put in env[
21:16 <sr> that is, the rack env. so say in yer sinatra app you do env[
21:16 rob___ left
21:17 <sr> err, env["mail.exception"] = 'foo' it'll be send even if no exception is raised
21:18 <TomV-415> Ahh... that closing if clause - so it executes when the sinatra ap closes to send the 'foo' message?
21:18 <TomV-415> (line 42)
21:18 <TomV-415> Thanks for the help - basic stuff I realize. I'm building a little module modeled on this one.
21:24 <sr> TomV-415, nah, it sends if there is a 'mail.exception' key on the rack env hash
21:35 multigrain joined
21:39 <TomV-415> gotcha. Just updated my attemp.. It almost works... but raises an exception on *any* request.. Where did I go astray? http://gist.github.com/338369
21:39 <TomV-415> sr: Are you in Norway? I'm going to spend 5 months in Finland later this year..seems nearby from where I sit now.
21:40 <sr> my irssi is. i am actually in sf
21:42 <TomV-415> sr: that's funny! small world indeed! I thought given the time, you must be in a different time zone.
21:46 dark joined
21:48 arnaudsj joined
21:54 <TomV-415> sr: I see that @app = app was missing from my initialize method, but that was not the issue - fixed it.
21:57 hipe joined
22:03 jbrennan joined
22:07 <TomV-415> Anyone familar with Sinatra extensions - can you see where I went wrong trying to build this simple extension? (http://gist.github.com/338369 )
22:08 bdimcheff joined
22:08 <TomV-415> (based on the structure in mailerexception: http://github.com/rack/rack-contrib/blob/master/lib/rack/contrib/mailexceptions.rb#L19
22:08 <TomV-415> )
22:09 <TomV-415> and sinatra's extension docs: http://www.sinatrarb.com/extensions.html
22:11 warthurton joined
22:11 warthurton joined
22:22 hadees joined
22:24 jbrennan left
22:43 jeremyevans joined
23:05 fbru02 joined
23:21 <TomV-415> Anyone have a suggestion for me?
23:21 <TomV-415> (http://gist.github.com/338369 )
23:22 <syd_> eat your homework
23:22 <syd_> do your vegetables
23:22 <TomV-415> :-)
23:22 <syd_> the worst part is
23:22 <syd_> I didn't even mean to mix those two up
23:26 <TomV-415> my favorite "The problem is you see the glass as half full, and I see it as empty"
23:27 <TomV-415> btw, I did my homework, but got the wrong answer.. not sure where to start troubleshooting.
23:28 blankslate joined
23:29 <TomV-415> I guess my next move is to copy the example EXACTLY and see if it works..