IRC log for 2008-05-20

3 views
Skip to first unread message

David Leal

unread,
May 20, 2008, 7:05:01 PM5/20/08
to me...@googlegroups.com
--- Log opened Tue May 20 00:00:28 2008
00:11 <+TheVoice> ShayArnett: you around?
00:11 <+ShayArnett> TheVoice: yup
00:48 <+BrianTheCoder> hey the rake install task doesn't install merb-slices
00:49 <+bbn> Hi team - what's the merb equivalent to "task :blabla => :environment do" for a rake task?
00:49 <+bbn> phrased differently, how do I load my merb models and what not in a rake task?
00:50 <+project_> one sec, lemme check me rakes
00:50 <+project_> :something => :merb_env
00:50 <+bbn> thanks project_
00:50 <+project_> task :entry_cleanup => :merb_env do
00:51 <+bbn> hm - that results in an ActiveRecord error
00:51 <+bbn> ActiveRecord::AdapterNotSpecified
00:52 <+bbn> oh, probably have to specify it in rake.rb?
00:53 <+bbn> merb
00:55 <+BrianTheCoder> so with slices if you add a view in the main app in the same controller location will it override the one in the slice?
01:03 <+bbn> found the answer to my problem: http://merb.lighthouseapp.com/projects/7433/tickets/234-activerecord-adapternotspecified-when-loading-merb_env-from-rake-task
01:15 <+datafirm> hello!
01:15 <+afrench> yo
01:16 <+datafirm> hows it going.
01:16 <+datafirm> I know this sounds odd, but this method does not seem to be working for me update_attributes(hash) I know my hash is correct, but nothing is being saved. Anywhere I can check for debugging info?
01:24 <+afrench> datafirm: clone the most recent again. I want to say the #update_attributes method got ...um...updated....today
01:25 <+datafirm> haha.. ok.. the code looked ok
01:25 <+datafirm> but i'll try to update and see what gives.
01:25 <+afrench> datafirm: http://github.com/sam/dm-core/commit/72db3851bb7e898c85ddd675d8bc8072142d63ce
01:26 <+datafirm> yay
01:26 <+datafirm> its working!
01:27 <+datafirm> ahh.. everything looked good to me.. did not notice the missing save :(
01:40 <+GMFlash> is it just me or does the merb textmate plugin not apply syntax highlighting to models?
01:40 <+GMFlash> hmm no text is showing up in colloquy
01:41 <+GMFlash> ok that was strange. i couldn't see anything i wrote in here
01:42 <+GMFlash> with the merb textmate plugin shouldn't it highlight my activerecord models?
01:46 <+GMFlash> nevermind. had to add { include = 'source.ruby'; } to the bundle
01:51 <+afrench> GMFlash: are you using colloquy?
01:52 <+GMFlash> yes
01:52 <+afrench> if you do a /reload style, that problem should fix itself
01:53 <+GMFlash> ahh. it's quite temperamental sometimes
01:53 <+afrench> yeah, I don't think colloquy has seen an update since the beginning of Tiger
01:53 <+GMFlash> it's "good enough". not much to update really
01:56 <+afrench> I sure wouldn't mind a better log viewer
01:58 <+Damm> I feel sorry for Cooloquy users... it's not that it's bad... it's just that it's not stable.
01:58 <+afrench> Damm: what do you use?
01:58 <+Damm> afrench, irssi
01:58 <+Damm> console
01:58 <+Damm> I have a server that runs linux, Terminal.app + screen + ssh
01:59 <+argv[]> linkinus is cool, but $$
02:00 <+Damm> I was using Limechat for awhile
02:00 <+Damm> it just lacked some crucial features.
02:04 <+GMFlash> is anyone else using the merb textmate bundle?
02:06 <+afrench> GMFlash: I am, though not very heavily
02:06 <+GMFlash> just trying to figure out if i'm doing something wrong. it isn't highlighting activerecord models out of the box
02:06 <+GMFlash> and i installed both the merb and rails bundles
02:09 <+GMFlash> so either i did something wrong or it just needs a little love
02:11 <+ShayArnett> GMFlash: i read something about it that you needed to activate the mode you want for merb... aka active record vs datamapper
02:11 <+GMFlash> yeah i did select activerecord
02:11 <+GMFlash> i ended up editing the bundle to make the highlighting work but not sure if i needed to
02:11 <+GMFlash> datamapper highlighted just fine
02:16 <+Damm> interesting
02:16 <+Damm> linkinus isn't bad... not exactly the prettiest thing
02:16 <+Damm> but it's nice
02:28 <+GMFlash> i put the activerecord gem into Merb.root/gems/activerecord-2.0.991 ... shouldn't it be able to load it?
02:29 <+GMFlash> says it can't find it http://pastie.caboo.se/private/amwjbn4kpohtwgyqqvu7aa
02:30 <+FSMonster> is there a way to force the creation of new templates to .haml instead of .erb?
02:34 <+GMFlash> please ignore my last question. i figured it out. human error
03:43 <+michaellatta> Does DataMapper support migrations yet? What is the approach to preserving data across deployments for DM?
03:44 <+nanodeath> +1 for asking
03:46 <+wycats> we have migrations but they're not awesome
03:47 <+nanodeath> does that mean not feature complete or documented, or...
03:47 <+wycats> both
03:47 <+wycats> but it works
03:47 <+nanodeath> what's the best way for...preserving dummy data in a datamapper-driven app?
03:50 <+nanodeath> or should I just be patient
04:12 <+viewlogic> what is merbs equivlent of script/runner to rails?
04:14 <+viewlogic> -r n/m ;)
04:14 <+GMFlash> merb -0r
04:14 <+GMFlash> err -r
04:14 <+GMFlash> yeah you got it
04:25 <+whoismario> anyone know why I would be having trouble serving static assets after I had changed and then deleted rack.rb?
04:26 <+GMFlash> should work fine if it looks the same as the rack.rb in the topic
04:27 <+whoismario> I must be doing something wrong.
04:27 <+nanodeath> whoismario, I don't know, I just renamed my rack.rb to rack.old.rb and it still serves static content right
04:29 <+whoismario> nanodeath: are you using image helper tags or just straight html?
04:29 <+nanodeath> whoismario, mm, actually not using any images at the moment, only css and js, and that's with helpers
04:30 <+whoismario> OK, I'm going to try and switch to the helpers. Thanks.
04:32 <+nanodeath> whoismario, shouldn't make a difference since the path should still be the same, but...could try that
04:33 <+whoismario> yeah, i'm sure i'm just doing something stupid
04:35 <+nanodeath> whoismario, dunno. static content/rack/bootloader is all smoke and mirrors to me
04:52 <+di3go_> hello!
05:05 <+barry_> hi
05:07 <+barry_> anyone know why installation of merb fails with the following error? extconf.rb:1:in 'require' : no such file to load -- mkmf (LoadError)
05:09 <+Booster> barry_: you need the ruby dev package, for which ever distro you're using
05:09 <+barry_> thanks booster
05:09 <+barry_> I just figured that out
05:09 <+barry_> :)
05:25 <+mtodd> when I try to run my Merb app on a brand new VPS... it can't find RedCloth, even after I *just* installed it with "sudo gem install RedCloth" and "gem list" shows it listed
05:25 <+mtodd> any ideas?
05:26 <+mtodd> also, it works on my mbp
05:36 <+datafirm> BrianTheCoder: Ping. Did you ever take a look at that error? Looks like Application is not available before_app_loads
05:43 <+mtodd> apparently there are issues with Merb's dependency loader and RedCloth should just be required instead of "depdency"d
05:43 <+mtodd> dependency*
05:47 <+BrianTheCoder> datafirm: I didn't have a chance, had to take care of work stuff all day, spent half of it on the phone
05:47 <+BrianTheCoder> I will tomorrow though
05:48 <+datafirm> BrianTheCoder: KNow how that goes.
05:48 <+datafirm> Im trying to figure it out myself right now.
05:48 <+BrianTheCoder> try just moving it to after_app_loads
05:49 <+datafirm> i just did, but Application does not see the new paths
05:51 <+datafirm> BrianTheCoder: I think it may be working actually.
05:51 <+datafirm> BrianTheCoder: They just aren't present in the applciation controller.
05:51 <+BrianTheCoder> weird, I looked at moving it to a slice, but not a fan of the slice architecture
05:52 <+datafirm> BrianTheCoder: Not here though: ~ No template found at /Users/wprater/Development/bsb-core/app/mailers/views/user_mailer/signup.text.*
05:53 <+datafirm> how about.. _template_roots << Array
05:55 <+BrianTheCoder> try it, if it works send me a patch, I'm about to crash, gotta get up early
05:55 <+BrianTheCoder> bleh
06:45 <+datafirm> can one put conditions on merbs router placeholder
06:55 <+nanodeath> datafirm, elaborate?
06:55 <+datafirm> nanodeath: something like this..
06:55 <+Blinchik> merb
06:56 <+datafirm> nanodeath: http://pastie.textmate.org/200044
06:56 <+datafirm> nanodeath: so the route is only valid if the placeholder matches that regex
07:00 <+nanodeath> datafirm, git or 0.9.3?
07:00 <+datafirm> nanodeath: git
07:00 <+nanodeath> datafirm, have you experimented with the conditions hash much?
07:02 <+datafirm> nanodeath: I was playing around.. it looks like I can do what I wish from the code.. but it complained about wanting a string.
07:05 <+nanodeath> huh, pesky
07:05 <+nanodeath> sort of unfortunate there's no mention of conditions in the Routing wiki
07:06 <+datafirm> yes, and it looks as if I cannot do what I was hoping for.
07:10 <+nanodeath> hm
07:10 <+nanodeath> support ticket?
07:34 <+holoway> is there a way to get the route defined in routes.rb back from url?
07:36 <+holoway> ah, .name
07:48 <+fightinjoe> I've got a tricky test question - I wantto write tests for a gem I've written for Merb, but it really only makes sense to test it when plugged into a Merb app. Does anyone have an example of embedding a single file Merb app into RSpec tests?
07:54 <+BrianTheCoder> fightinjoe: check out my can_has_auth
07:55 <+fightinjoe> BrianTheCoder: Cool - checking out the writeup now: http://downtowncartel.com/can-has-auth-sure/
07:56 <+BrianTheCoder> fightinjoe: my spec helper should help with what you're looking to do
07:57 <+fightinjoe> BrianTheCoder - hey! cool to see that my blog post inspired this plugin!
08:46 <+bingoer> hi all
08:47 <+bingoer> I started a new merb project, and specified :use_orm activerecord in init.rb
08:48 <+advany> bingoer: correct syntax would be use_orm :activerecord
08:57 <+bingoer> er ... that's what I meant,s orry
08:58 <+advany> bingoer: so whats the problem? :-)
08:58 <+bingoer> anyway, I was saying: this is the error I get http://pastie.caboo.se/200073
08:58 <+bingoer> ActiveRecord::AdapterNotSpecified
08:59 <+advany> bingoer: did you do "gem install merb_activerecord -y" and then start with merb?
09:00 <+bingoer> well, I installed edge merb, using the sake tasks provided at merbivore.com/merb-dev.sake
09:00 <+bingoer> and yes, merb_activerecord is one of the installed gems
09:01 <+advany> bingoer: and you have an database.yml?
09:01 <+advany> and configured it?
09:02 <+bingoer> yes
09:02 <+bingoer> I've run several migrations, so the db works fine
09:03 <+bingoer> Isn't it weird that 'loading gem 'merb_activerecord' is output twice ?
09:03 <+advany> bingoer: mhhh, no idea (I use datamapper).... sorry mate, maybe someone else could help you
09:04 <+bingoer> ok
09:10 <+bingoer> so no one is using active_record ?
09:10 <+random8r> bingoer I am.
09:10 <+bingoer> :P
09:10 <+jonuts> bingoer: activerecord is soooo 2007
09:10 <+random8r> lol
09:10 <+random8r> it also does migrations lol
09:10 <+bingoer> hehe
09:11 <+bingoer> jonuts: I needed something stable for a commercial app - wasn't sure whether to risk it with DM
09:11 <+jonuts> it's cool. i have a hard time keeping up with dm what with all the cool features they add in daily
09:11 <+advany> bingoer: AR is save choice if you don't want to mess with the underlying framework... but I love DM, clean code, easy to fix stuff
09:12 <+bingoer> ok, in /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb, the error is on line 207 which is:
09:13 <+bingoer> raise AdapterNotSpecified unless defined? RAILS_ENV
09:13 <+bingoer> :P
09:13 <+advany> bingoer: lol :-)
09:14 <+advany> bingoer: RAILS_ENV="merb" in your init.rb?
09:14 <+bingoer> er .. no
09:14 <+bingoer> :P
09:15 <+bingoer> is it required or are you pulling my leg ? :)
09:15 <+random8r> it's not required as far as I remember!
09:16 <+bingoer> he must be kidding :)
09:16 <+bingoer> now ... how does merb_activerecord work - does it interface with the activerecord gem ?
09:16 <+hassox> bingoer: what are you trying to do?
09:16 <+bingoer> hassox: run activerecord with merb - a brand new app
09:17 <+hassox> in your init.rb
09:17 <+hassox> use_orm :activerecord
09:17 <+bingoer> hassox: I did that
09:17 <+hassox> and make sure you have the merb_activerecord gem installed
09:17 <+hassox> and the activerecord one too
09:17 <+hassox> bingoer: did you setup the database.yml file ?
09:17 <+bingoer> yes, I setup database.yml, and I can run migrations successfully.
09:18 <+hassox> noice :)
09:18 <+hassox> so what's up?
09:18 <+advany> bingoer: I was kidding :-)
09:18 <+bingoer> I do have merb_activerecord installed - 0.9.4
09:29 <+bingoer> random8r: perhaps you can help me ?
09:29 <+bingoer> random8r: can you do a rake routes --trace and post the trace ?
09:32 <+random8r> um
09:32 <+random8r> not really sorry 'm working
09:32 <+bingoer> ok
09:33 <+random8r> hang on actualy
09:33 <+random8r> bingoer - routes??
09:33 <+random8r> bingoer dude i'm not using rails - i'm using merb.
09:40 <+bingoer> I'm talking about merb
09:40 <+bingoer> there is a routes task, fyi
09:41 <+random8r> oh I wonder why it doesn't work then... maybe I don't have that bit on that app
09:41 <+random8r> rake complained there wasn't any such task - fyi ;-)
09:43 <+bingoer> what version of merb are you using ? I'm on edge
09:44 <+random8r> 0.92
09:44 <+bingoer> ah, that's it then
09:44 <+bingoer> thanks anyway
09:44 <+random8r> yup.
09:44 <+random8r> np
09:45 <+bingoer> I am curious though as to why people keep mentioning rails - not out of fondness I hope ! :D
09:47 <+random8r> what do you mean? who's mentioning rails?
09:49 <+bingoer> there were some jokes earlier :)
09:51 <+random8r> o ok
09:57 <+shingara> Hi
10:35 <+advany> somehow merb+datamapper feels very fast out-of-box (compared to rails), every page actions seems to be very quick... or is it my imagination
11:06 <+zond> merb_datamapper is suddenly out of order
11:06 <+zond> it loads, but doesnt run
11:06 <+zond> is this string wrong nowadays? " after(defined?(BeforeAppLoads) ? BeforeAppLoads : BeforeAppRuns)"
11:08 <+lukeredpath> morning
11:10 <+zond> hm, bootloader.rb has a broken debug statement
11:10 <+zond> http://pastie.caboo.se/200116 <- it says "/usr/lib/ruby/gems/1.8/gems/merb-core-0.9.4/lib/merb-core/bootloader.rb:67:in `run': undefined method `debug!' for nil:NilClass (NoMethodError)"
11:24 <+zond> i am starting to the the suspicion that merb-core is broken at the moment
11:24 <+zond> BootLoader runs Dependencies
11:25 <+zond> but since use_orm gets run as a dependency, it never gets run, since the Bootloader is already finished by then
11:29 <+zond> here is my trace output: http://pastie.caboo.se/200124
11:30 <+zond> to me it seems like the merb startup sequence is broken
11:30 <+zond> but please prove me wrong, because i want my app to work :/
12:52 <+bingoer> for the record, I found a solution for the AdapterNotSpecified problem that I countered earlier. The solution was simple: http://merb.lighthouseapp.com/projects/7433/tickets/234-activerecord-adapternotspecified-when-loading-merb_env-from-rake-task
12:53 <+bingoer> *encountered
13:13 <+hot-dog> humm, i use in route: r.resources items do |p| p.resources 2items end
13:14 <+hot-dog> ok that works, but url(:item_2items, @item) create /items//2items/
13:14 <+hot-dog> whitout id
13:15 <+hot-dog> without
14:03 <+GitHub43> merb-more: Fabien Franzen master SHA1-39be544
14:03 <+GitHub43> Added Slice.deativate! to remove Slice from ObjectSpace and routes
14:03 <+GitHub43> http://github.com/wycats/merb-more/commit/39be5449dfdd35066101493f85a79c6f1cfa605c
14:21 <+GitHub100> merb-more: Fabien Franzen master SHA1-57755d8
14:21 <+GitHub100> Fixed some left-overs from refactoring
14:21 <+GitHub100> http://github.com/wycats/merb-more/commit/57755d81a7271932a1e4502ecccdba44b6d5f289
15:15 <+eltiare> Hey, I'm making my own database migrator for Merb, and was wondering if anyone had any suggestions for what to include -- more specifically, what do you hate about ActiveRecord's migrator?
15:21 <+bsdpaul> eltiare: you might want to look at the migrations in DataMapper, both automigrations and the new migrations DSL
15:22 <+eltiare> bsdpaul - Where exactly do I go to learn about the migrations in Datamapper? I've looked through the source code with little luck to this point.
15:22 <+bsdpaul> eltiare: at this point the best reference is the specs and http://merb.4ninjas.org/
15:23 <+eltiare> bsdpaul: Thanks!
15:24 <+bsdpaul> eltiare: no problem, docs are sparse at the moment but the specs are really good, I would be surprised if auto migrations and the migrations addon don't solve your issues
15:37 <+myobie> is there any documentation about streaming a file straight to S3?
15:41 <+hassox> myobie: there's an example of going the other way I think in the stream_file docs
15:41 <+myobie> hassox: yeah, i remember back in the day when people were using merb to upload files straight to s3, but iono if that's still possible
15:42 <+hassox> myobie: if you're using mongrels it should be pretty simple
15:42 <+hassox> render_then_call would do the job nicely I think
15:42 <+hassox> but it only works with mongrel atm
15:42 <+myobie> hassox: yeah, i am doing that now, but i think they were straming (as in like block by block) so that you don't have to take the time to upload twice
15:43 <+hassox> myobie: not sure how you'd do that since nginx (assuming your using that) buffers the file first
15:43 <+hassox> then hands it to merb
15:43 <+myobie> hassox: yeah, i think they had to have one route that went straight into a merb process to make it work, i need to find it, ezra talked about it in a presentation once
15:50 <+project_> does anyone have any tactics for managing their merb apps after reboot?
15:50 <+project_> with my rails apps i just use a crontab "@reboot /usr/bin/mongrel_cluster_ctl restart"
15:51 <+project_> feel free to kick me if merb understands mongrel_cluster.yml files
16:49 <+afrench> so....the merb-slices thing is pretty cool....but I'm a little confused as to it's use-case
16:50 <+ShayArnett> afrench: it's all about modularity...
16:50 <+ShayArnett> say you wanted to add an image gallery to your site... just install a merb-slice image gallery and away you go...
16:50 <+ShayArnett> same with blogs, forums, user profiles, etc etc etc
16:50 <+afrench> hmmm
16:50 <+myabc> merb-slices answers my prayers
16:51 <+myabc> ShayArnett: I am working on a site that needs to sell photos. I am can create a cart slice (merb_mart, I'm working on) and an image slice.. and mix it up.
16:51 <+ShayArnett> myabc: theoretically
16:52 <+afrench> my mind thinks back to similar to-do regarding rails components...and engines....
16:52 <+hassox> afrench: there's a fundamental difference
16:52 <+hassox> slices uses publicly available methods of merb
16:53 <+hassox> engines used black magic deep in the bowels of rails
16:55 <+afrench> anyone used them in a production setting yet?
16:56 <+afrench> I'm mostly wanting to know if anyone's come up with "best practices" regarding application design using merb-slices
16:56 <+ShayArnett> afrench: they were just pushed yesterday i think :P
16:56 <+afrench> say I'm building Facebook....which merb-slices would I have?
16:57 <+afrench> ShayArnett: yeah, I know ;-) I'm mostly just asking questions to better understand them, honestly.
16:58 <+ShayArnett> afrench: not so sure...
17:00 <+afrench> modularity is spiffy....when it contributes to a more understandable domain model
17:01 <+afrench> if it makes sense to break it away
17:01 <+ShayArnett> what i'm concerned about is the ability to use and extend models from one slice with your own code, or from another slice
17:03 <+afrench> we've got quite a few app's at work that'd likely benefit from merb-slicing....assuming we can donkey-punch (or whatever the term is now) customizations into it fairly easily
17:04 <+ShayArnett> yeah... because if you can't use and extend models from other slices doing things like blogs and forums as slices would suck... because you couldn't share users between them
17:04 <+hassox> users is the big one I think...
17:04 <+hassox> other things like tags might also pose an interesting dilmea
17:05 <+ShayArnett> anywhere that needs to extend a model by adding an id column worries me
17:05 <+afrench> how do you mean?
17:06 <+ShayArnett> say there's a user slice, which includes authentication and user profiles
17:07 <+ShayArnett> and i want to add on a slice that does something else but needs to for whatever reason have a foo_id added to the user model
17:07 <+afrench> like a photo uploading slice that tracks which user uploaded the photo
17:07 <+ShayArnett> right
17:08 <+afrench> hmm
17:08 <+hassox> other way around
17:08 <+hassox> isn't it?
17:08 <+ShayArnett> hassox: yeah actually it is... but the basic idea fits
17:08 <+afrench> yeah
17:08 <+hassox> lol... anyway..
17:08 <+ShayArnett> assume that photo upload slice doesn't include users and you want to add users
17:08 <+hassox> gnite lads
17:09 <+ShayArnett> cya
17:09 <+afrench> point being, the Auth::User model needs a Media::Photos photo_id foriegn key on it
17:09 <+afrench> hassox: lata
17:19 <+mtodd> is Michael Klishin in here?
17:26 <+Sevenos> hi, short question how can I stream a file with merb?
17:27 <+Sevenos> (I want only logged in user to be able to download their files)
17:28 <+nanodeath> Sevenos: it's not about streaming, but this may be relevant for you: http://www.merbunity.com/tutorials/2
17:30 <+Sevenos> nanodeath: send_file looks great :) don't think it is that easy, thanks
17:34 <+jackdempsey> mtodd: yes, he's antares (though not in here right now he often is)
17:40 <+mtodd> jackdempsey: thanks
17:40 <+mtodd> there are some failing specs for merb-assets and wanted his opinion on that
17:40 <+datafirm> Hello.
17:41 <+datafirm> Does anyone know how to add more _template_roots "before_app_loads" in merb HEAD?
17:42 <+wycats> Merb.push_path
17:43 <+datafirm> wycats: Thanks, i'll give this a shit now.
17:43 <+wycats> :)
17:43 <+wycats> look at the docs for it :)
17:43 <+wycats> there's also a way to describe the entire framework
17:44 <+wycats> which you can see an example of in the flat app generator
17:47 <+datafirm> wycats: Im looking at the code (docs?) now.
17:48 <+datafirm> wycats: first glance, it appears to have ovveridden the defailt views path when I setup my own (another).
17:55 <+wycats> datafirm: right
17:55 <+wycats> in the flat app
17:55 <+wycats> but not push_paths
17:55 <+wycats> oh yeah
17:55 <+wycats> it does
17:55 <+wycats> heh
17:55 <+wycats> gotta run to work
17:55 <+wycats> I'll help you in 10
17:56 <+datafirm> wycats: Thanks!
17:56 <+datafirm> wycats: im heading to the office too.
17:58 <+nanodeath> merb: more of a way of life than a framework
18:07 <+atmos> yo is there an exception notifier for 0.9.4 ?
18:15 <+rel-me> atmos: http://ducktyper.com/2008/5/13/merb-exception-email-notifier
18:15 <+rel-me> there is also a merb-exceptions plugin at http://github.com/newbamboo/merb_exceptions/tree
18:17 <+atmos> rel-me: thanks :)
18:17 <+rel-me> np
18:22 <+bbn> hi team - just tried to use capistrano's deploy:migrations task on a new merb project and found the rails-centrice RAILS_ENV in there. anyone know of merb-friendly versions of common cap tasks?
18:23 <+atmos> bbn: i'm using vlad, works quite well
18:24 <+atmos> there should be some way to override those specific tasks iirc
18:25 <+bbn> atmos: yeah, I can do it. thought it might already have been done :)
18:25 <+atmos> i found migrating to vlad to be a pleasant change of pace :)
18:28 <+afrench> atmos: why'd you move to vlad?
18:29 <+atmos> i spent an hour scratching my head as to why capistrano wasn't working as expected, so i switched to vlad and had a working recipe in like 20 minutes
18:30 * atmos has deployed quite a few apps with capistrano too
18:30 <+afrench> we're looking for a way to deploy from git branches
18:30 <+atmos> normally we used environment variable or command line params to cap for that kinda stuff
18:34 <+datafirm> wycats: I tried modifying that method to push the values onto the load_paths array, but its not working yet. Any luck on your side?
18:37 <+Kriyasurfer> Has anyone started a Merb equivalent of http://agilewebdevelopment.com/plugins ?
18:39 <+ShayArnett> Kriyasurfer: nope... github search usually does the trick though
18:39 <+Kriyasurfer> ShayArnett: Hmmm, thanks
18:44 <+Kriyasurfer> ShayArnett: Cool, there's much more there than I thought. This helps a ton, thanks.
18:47 <+ShayArnett> Kriyasurfer: no prob... and yes theres quit a bit of fun stuff to trod through
18:50 <+rel-me> i remember ezmobius twittered about a merbj (merb backgroundjob) app, slice or plugin awhile back...
18:50 <+rel-me> does anyone know if he started that already or..
18:50 <+onizuk1> hey wondering if could get help, i'm getting 'no such file to load -- merb_datamapper (LoadError)' when running 'merb' on a new app (datamapper is installed)
18:50 <+jackdempsey> did you require merb_datamapper in your init
18:50 <+jackdempsey> and have use_orm :datamapper
18:50 <+atmos> rel-me: yeah
18:51 <+onizuk1> i have 'use_orm :datamapper'
18:51 <+onizuk1> do i need to require it as well?
18:51 <+jackdempsey> try require merb_datamapper
18:52 <+onizuk1> same thing comes up
18:52 <+jackdempsey> hmm i think that should cover it. hard to know what else might be wrong without being there
18:53 <+onizuk1> alright, i'll try reinstalling it and seeing how it goes, thanks though
18:54 <+onizuk1> ah i'm a fool... had datamapper, but not merb_datamapper... =_=;;
18:57 <+nanodeath> man method_missing is amazing...
19:13 <+nanodeath> so...what are some of the general purpose javascript libraries people use, in addition to jQuery and Prototype+Scriptaculous?
19:17 <+cilquirm> nanodeath: YUI, Ext-core, mootools
19:18 <+nanodeath> cilquirm: thanks
19:21 <+nanodeath> right now my little merb javascript plugin only supports jquery; at the point where I need to consider what other js libraries should be supported
19:21 <+pluesch0r> nanodeath: what does your merb javascript plugin do?
19:22 <+nanodeath> um...well, there's link_to_remote which is fully implemented, and on the server I have update_page_js, update_page_raw_js, and update_page_html which are all aspects of Rails' update_page
19:23 <+nanodeath> pluesch0r: like on the client you say link_to_remote blah, :update => "#inbox" and then you can say update_page_html(partial('inbox', :messages => Message.find(:all, :conditions => ['to_account = ?', current_account.id]))) on the server
19:23 <+pluesch0r> ah, ok.
19:23 <+nanodeath> pluesch0r: also update_page_js do insert_html '#actual_message_table', :bottom, "<tr><td>Testing</td></tr>" end works
19:24 <+nanodeath> I made that comment about method_missing earlier because I made it so you can suffix any generator command with _id and be able to type insert_html_id 'actual_message_table'
19:25 <+nanodeath> also nesting javascript generator calls works (...only to depth 1 at the moment)
19:26 <+nanodeath> pluesch0r: is there anything you would find useful in particular? I'm sort of looking for a unique direction instead of "copy everything Rails does"
19:27 <+pluesch0r> nah. i'm using full js guis.
19:27 <+pluesch0r> no need to generate js code on the server side.
19:27 <+pluesch0r> i was just curious.
19:28 <+nanodeath> pluesch0r: gotcha
19:31 <+nanodeath> pluesch0r: it can occasionally be helpful
19:32 <+pluesch0r> yeah. not in my case though.
19:43 <+viewlogic> nanodeath: do you have that plugin on git?
19:43 <+nanodeath> yeah...it's tagged private atm and doesn't have too much docs just yet though
19:45 <+viewlogic> cool, i'd definitely be interested in that when its ready
19:46 <+nanodeath> viewlogic: any features in particular you need?
19:47 <+viewlogic> i don't use a whole lot really... little bit of updating/replacing and effects (slide in/out, etc..) is about all I need
19:48 <+nanodeath> mmk. which js library?
19:48 <+viewlogic> collapsing/expanding capabilities are usuaally nice too
19:48 <+viewlogic> prototype/scriptaculous
19:49 <+nanodeath> alright
19:49 <+nanodeath> good excuse to start the proto/scripta part of things
19:56 <+ericdwhite> Q: Should merb gem defined in merb-more require mongrel? is that just for convenience?
20:00 <+nanodeath> hmm....anyone know if Prototype has the equivalent of jQuery's jQuery.noConflict()?
20:00 <+jackdempsey> nanodeath: last i checked, no
20:00 <+nanodeath> bugger
20:14 <+project_> prototype RUNS TINGS
20:14 <+project_> tings NAH RUN prototype
20:21 <+nanodeath> project_: you've been playing too much GTA
20:22 * project_ runs over nanodeath with car
20:22 <+nanodeath> project_: drops glowing green money
20:22 <+project_> haha
20:43 <+GitHub117> merb-more: Matt Todd master SHA1-c6acf85
20:43 <+GitHub117> Added a way to modify the anchor label.
20:43 <+GitHub117> http://github.com/wycats/merb-more/commit/c6acf8571092c8bb2dd48e4f47a6a2e73eaa7d2d
20:43 <+GitHub117> merb-more: Matt Todd master SHA1-00e192d
20:44 <+GitHub117> link_to_function now takes an options hash and calls to_xml_attributes in the link definition.
20:44 <+GitHub117> http://github.com/wycats/merb-more/commit/00e192d30b50206d045b515ae3f7fb85e8972a2c
20:44 <+GitHub117> merb-more: Matt Todd master SHA1-8788061
20:44 <+GitHub117> Fixed specs for link_to_function changes and added specs for new functionality.
20:44 <+GitHub117> http://github.com/wycats/merb-more/commit/878806140eb3230de3e8f822bd7bf81e7d1ec8e5
20:44 <+GitHub117> merb-more: Matt Todd master SHA1-2f89d40
20:44 <+GitHub117> Made the options hash optional.
20:44 <+GitHub117> http://github.com/wycats/merb-more/commit/2f89d40e569e800245cd166220c28ace72233bed
20:44 <+GitHub117> merb-more: Matt Todd master SHA1-fdf8f0f
20:44 <+GitHub117> Added task to Rakefile to run specs.
20:44 <+GitHub117> http://github.com/wycats/merb-more/commit/fdf8f0f26de1323d2787e8f8ce45d1c42b57a074
20:44 <+GitHub117> merb-more: Michael S. Klishin master SHA1-c4c87cf
20:44 <+GitHub117> Merge branch 'master' of g...@github.com:wycats/merb-more
20:44 <+GitHub117> http://github.com/wycats/merb-more/commit/c4c87cfa46b80a91081b2f31e24e6ee1444f0e80
20:44 <+GitHub117> merb-more: Michael S. Klishin master SHA1-575225d
20:44 <+GitHub117> Make link_to spec example use match and never fail because of attributes ordering
20:44 <+GitHub117> http://github.com/wycats/merb-more/commit/575225df3828c7fecca43702d1229b61760e1997
20:44 <+GitHub117> merb-more: Michael S. Klishin master SHA1-7ab8e4a
20:44 <+GitHub117> Merge branch 'mtodd'
20:44 <+GitHub117> http://github.com/wycats/merb-more/commit/7ab8e4afc8c7c73481857288d4c56836b3dfdedb
20:44 <+GitHub117> merb-more: Matt Todd master SHA1-601b0a6
20:44 <+GitHub117> Used the correct index for the anchor.
20:44 <+GitHub117> http://github.com/wycats/merb-more/commit/601b0a66f833b9a037115a19340ba0eedd6fde21
20:44 <+GitHub117> merb-more: Michael S. Klishin master SHA1-d2de0fc
20:44 <+GitHub117> Merge branch 'master' of g...@github.com:wycats/merb-more
20:44 <+GitHub117> http://github.com/wycats/merb-more/commit/d2de0fc8424c441bd7878e99c1bf29efbc0a3951
20:50 <+Damm> jebus
21:02 <+nanodeath> so uh, can someone explain to me what's with the github bot
21:04 <@ezmobius> it posts comits here
21:12 <+atmos> anyone using the newbamboo exception notifier ?
21:12 <+wycats> atmos: we are
21:12 <+atmos> yay \o/
21:12 <+datafirm> wycats: Hello! Did you get a chance to look at push_path ?
21:13 <+GitHub94> merb-more: Michael S. Klishin master SHA1-3b25702
21:13 <+GitHub94> It was decided to get rid of evil link_to_function. Yay for unobtrusive JS.
21:13 <+wycats> datafirm: remind me the issue?
21:13 <+GitHub94> http://github.com/wycats/merb-more/commit/3b2570278748541aba04815b2af4ac46d4578ae8
21:13 <+datafirm> wycats: push_path overwrites the path, vs. pushing more :view, :mailers paths onto the template_root_paths
21:14 <+wycats> datafirm: you'd have to modify the globbing
21:14 <+mattetti> atmos: what's the url for the bamboo;s github account?
21:14 <+atmos> http://github.com/newbamboo/merb_exceptions/tree/master
21:14 <+datafirm> wycats: really? I checked the resulting paths and the defaults were gone after I pushed them with push_path
21:15 <+wycats> datafirm: you are reporting the current behavior
21:15 <+wycats> what I'm saying is that it's not necessarily trivial to fix in 5 minutes
21:15 <+datafirm> wycats: ie: did I submit a bug?
21:15 <+mattetti> wow, the notifier is hot!
21:15 <+mattetti> web hooks!
21:16 <+datafirm> wycats: I dont need you to fix it now, I just wanted to be sure I was not experiencing something as it were intended to be designed.
21:16 <+datafirm> wycats: My goal is to add more paths to _template_root_paths "before_app_loads"
21:17 <+atmos> datafirm: how are you calling it ?
21:17 * atmos just did that for models earlier
21:17 <+wycats> datafirm: for now you can just use a different name for stuff
21:17 <+wycats> datafirm: we can talk on the phone later today and maybe I can help you :)
21:18 <+advany> wycats: are you offering 24/7 phone support for merb? ;)
21:18 <+wycats> advany: ummmmmm
21:19 <+wycats> :P
21:19 <+wycats> invite only ;)
21:19 <+advany> lol
21:24 <+nanodeath> so uh, this is sort of a super n00bish Ruby question, but how does one get class variables set to an initial value?
21:24 <+wycats> @@foo = bar
21:24 <+nanodeath> specifically within a module
21:24 <+nanodeath> is it any different?
21:24 <+wycats> for the class the module is included in?
21:24 <+nanodeath> it's being...surprisngly difficult
21:24 <+wycats> yep
21:24 <+myobie> does merb - i always use the test env?
21:24 <+wycats> in the past I've had to use class_eval
21:25 <+wycats> myobie: it uses the runner env I think
21:25 <+myobie> wycats: Merb.environment == "test"
21:25 <+nanodeath> wycats: alright, thanks
21:25 <+myobie> wycats: it might be lying
21:26 <+nanodeath> wycats: well, I mean I want My::Module.a_var to have a default value
21:26 <+datafirm> wycats: Im calling it like so: http://pastie.textmate.org/200427
21:27 <+datafirm> wycats: And that will add the paths for type :view and :mailer, but will overwrite the Application defaults
21:29 <+datafirm> If one wanted to concatenate a string to a name.to_symbol call how would that be done?
21:30 <+datafirm> damnit
21:31 <+datafirm> hate it when I answer myself! haha: ("#{name}_view").to_sym.
21:37 <+wycats> datafirm: I understand ;)
21:38 <+wycats> nanodeath: then you can just use @@
21:38 <+datafirm> wycats: You mentioned using a different name for the :type of the path, but this does not allow my views to render since its not rendered as a :view type. At least that what I _think_ is happening! ;)
21:38 <+wycats> datafirm: yep
21:38 <+datafirm> wycats: and _template_roots and Merb.load_paths are for different application logic?
21:38 <+wycats> file a ticket
21:38 <+wycats> we'll make it happen
21:39 <+wycats> datafirm: yep
21:39 <+wycats> you can give a controller its own _template_root
21:39 <+wycats> which is out of the load paths
21:39 <+wycats> they get concatted in
21:39 <+datafirm> Ha! I bet you will, but Im not sure what I am requesting.. I think its for a way to append or prepend to _template_roots
21:39 <+datafirm> ok
21:47 <+jamiehoover> How can I make a helper available to a controller?
21:56 <+ericdwhite> Should merb gem defined in merb-more require mongrel? is that just for convenienc
21:59 <+derdeweeeeee> I'm trying to setup nginx per the wiki... but what is a polling server?
22:22 <+cilquirm> anyone using dojo with merb?
22:22 <+holaway> cilquirm: would be trivial
22:23 <+cilquirm> holaway: ok cool. i wasn't sure if most people used anything besides prototype :-)
22:24 <+datafirm> I like YUI ;)
22:24 <+ch0wda> jquery user in the house
22:28 <+project_> jquery what what!!
22:29 <+project_> the last 5 lines are a big part of what makes merb awesome
22:29 <+nanodeath> it's good and bad that everyone uses a different library :-/
22:31 <+project_> i don't know, i loathe the way rails has "a right way of doing javascript"
22:33 <+derdeweeeeee> but the helpers make it easy to use
22:33 <+derdeweeeeee> and easy is always good
22:35 <+nanodeath> I'm trying to make this javascript plugin easy to add to, but like...can you imagine "Javascript helper: now with support for jquery, prototype, scriptaculous, yui, mootools, dojo, etc"?
22:36 <+derdeweeeeee> nanodeath: I dunno about that... each library behaves differently... what do they have in common?
22:36 <+project_> what does the javascript plugin do that couldn't be done on a individual library level?
22:36 <+nanodeath> okay well, obviously jquery and scriptaculous don't overlap, but jq and proto would
22:36 <+project_> e.g. why use link_to_function when that should be unobtrusively added by whatever behavior code you're using
22:36 <+derdeweeeeee> isn't scriptaculous related to proto?
22:36 <+iamaleksey> I like mootools - it's totally modular, just like merb. but use jquery and rails, duh
22:36 <+nanodeath> yeah
22:37 <+nanodeath> er, derdeweeeeee: yeah
22:37 <+datafirm> wycats: http://merb.lighthouseapp.com/projects/7433-merb-core/tickets/335-inject-_template_roots-before_app_loads
22:37 <+nanodeath> derdeweeeeee: I think we'll just have to see
22:37 <+ch0wda> yeah, i generally try to be as unobtrusive as possible and as such steer clear from the helpers as much as possible
22:38 <+derdeweeeeee> how are helpers obtrusive?
22:38 <+ch0wda> by generating the javascript right in the html
22:39 <+wycats> datafirm: :)
22:39 <+derdeweeeeee> well, how do you handle js then?
22:39 <+derdeweeeeee> js is in the html
22:39 <+ch0wda> all in application.js to overlay behaviors once the page has rendered
22:39 <+wycats> yeppers :)
22:40 <+wycats> ch0wda ftw
22:40 <+iamaleksey> derdeweeeeee: $(document).ready() in a separate file is unobtrusive
22:40 <+wycats> or just $(function() { })
22:40 <+wycats> whee
22:40 <+derdeweeeeee> hmm, how do you tell it how to interact with the page then?
22:40 <+ch0wda> thx wycats, i'll admit that most of the time jquery in action is never more than an arm's length away
22:40 <+wycats> derdeweeeeee: like magic
22:40 <+derdeweeeeee> when I used helpers in rails I would tell it what to shift around
22:40 <+wycats> ch0wda: :)
22:40 <+wycats> glad it's been helpful
22:40 <+datafirm> what we also need for js is this..
22:41 <+wycats> and glad Merb is so heavily UJS-oriented
22:41 <+ch0wda> yeah, me too. i've actually gone back to some of my rails stuff and stripped a bunch of stuff out.
22:41 <+derdeweeeeee> so I'm looking at the nginx config files from the merb wiki... why do you needs a app.conf? it looks like the main config does everything?
22:42 <+datafirm> allow include_required_js to also yield code scripts, vs just script tag includes.
22:42 <+datafirm> maybe we need to modify require_js to also take a block of code vs just paths.
22:42 <+nanodeath> seems like the consensus is that people wouldn't use javascript helpers except where extremely convenient/necessary, eh
22:43 <+datafirm> sometimes you need to write JS on teh fly and we all know we dont want it hanging out in the middle of the page.. its supposed to be in the HEAD (or near the bottom if you listen to YUI performance tips ;) )
22:47 <+wycats> nanodeath: and we're going to make it extremely convenient to use UJS
22:49 <+nanodeath> wycats: UJS is good stuff eh?
22:51 <+wycats> yes
22:51 <+wycats> not the plugin
22:51 <+wycats> the patternn
22:51 <+nanodeath> ah
22:52 <+nanodeath> hm
22:54 <+nanodeath> wycats: so I guess someone's already working on that?
22:54 <+wycats> nanodeath: I thought ivey was
22:54 <+wycats> but I gotta ask him
22:55 <+nanodeath> has he been in #merb in the last few days? I don't think I've seen him
22:57 <+wycats> no
22:57 <+wycats> but I've talked to him
22:57 <+wycats> he's doing business
22:58 <+nanodeath> k
23:23 <+bbn_> yo friendz. does merb have a partial counter? in rails it's partial_name_counter.
23:23 <+bbn_> don't see it anywhere in merb-core
23:23 <+GitHub182> merb-more: Fabien Franzen master SHA1-3b66352
23:23 <+GitHub182> Merge branch 'master' of g...@github.com:wycats/merb-more
23:24 <+GitHub182> http://github.com/wycats/merb-more/commit/3b66352c68efe606ec72e963ee04ea46fd069643
23:29 <+bbn_> i suppose that's a no?
23:30 <+lightnote> What is another way to inject a param when a database .save action is being sent to the model?
23:30 <+lightnote> besides a hidden input field
23:32 <+lightnote> I have this line of code @basefile.folder_id = params[:folder_id]
23:32 <+lightnote> @basefile = Basefile.from(params[:Filedata])
23:33 <+lightnote> but when I use a mootools javascript to replace the form with a flash app the folder_id param is lost in the mix
23:49 <+lightnote> Are globals evil?
23:49 <+ShayArnett> lightnote: yes... evil until proven innocent
23:50 <+lightnote> Well they sure as hell fixed my problem
23:50 <+lightnote> that I have wracked my brain for three days on
23:50 <+ShayArnett> whats the problem?
23:50 <+lightnote> in my view I have <% $taco = @folder.id %>
23:51 <+ShayArnett> ew
23:51 <+lightnote> I need to inject the @folder.id param into the Filedata param when sending the action to the controller for file upload
23:51 <+ShayArnett> are they nested resources?
23:51 <+lightnote> as the Fancy Uploader seems to ignore mf hidden input field
23:52 <+lightnote> it's the has_may belongs_to deal
23:52 <+ShayArnett> do you have a sample with the hidden field?
23:52 <+lightnote> so folders have many files
23:52 <+lightnote> http://pastie.textmate.org/200548
23:53 <+ShayArnett> so are your urls like /folders/1/files , /folders/1/files/2 etc
23:53 <+lightnote> it's running Mootools as jquery does not have this detailed of a file uploader yet
23:54 <+lightnote> http://localhost:4000/folders/238
23:54 <+lightnote> folders/#
23:54 <+lightnote> the files do not have a show action they just download
23:54 <+ShayArnett> if you nest files inside of folders in your router... you can get access to the folder id in your controller
23:55 <+lightnote> the file upload action is directed to the files controller
23:55 <+lightnote> to try and keep it all restful
23:55 <+ShayArnett> look at the merbums source, the way that i did topics would work for what your doing
23:57 <+lightnote> ShayArnett: checking now
23:57 <+ShayArnett> basically you have a nested route for files, so that your file create url is something like /folders/xx/files... then in the controller you have access to the folder_id because of routing... so you add that folder id into your hash in your create method call
23:57 <+lightnote> funny how the global just works though :P
23:57 <+ShayArnett> lightnote: if you only ever have one user uploading files
23:57 <+lightnote> AH!
23:58 <+lightnote> good catch
--- Log closed Wed May 21 00:00:03 2008
Reply all
Reply to author
Forward
0 new messages