From flo.schaf at gmail.com Sun Mar 2 12:44:20 2008 From: flo.schaf at gmail.com (Florian Schaf) Date: Sun, 2 Mar 2008 18:44:20 +0100 Subject: (Noob) Image upload: rename file Message-ID: Hi! I'm building an app where the user can upload images. this works fine and the uploaded file is copied from the temp directory to an MerbRoot/uploads/id directory. my problem is that the filename is something like Merb.5288.0. How can I rename it? my model is available at pastie. I'm sure this question is not too sophisticated (-; regards flo schaf PS: The value of the size field is always 0. why? (thats not that important) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080302/6e531732/attachment.html From farrel.lifson at gmail.com Sun Mar 2 17:47:09 2008 From: farrel.lifson at gmail.com (Farrel Lifson) Date: Mon, 3 Mar 2008 00:47:09 +0200 Subject: Models are not initialised correctly with 'rake test' in Merb 0.9.1 Message-ID: I'm using Sequel as my ORM and Test::Unit as my testing framework and have the following model: class Item < Sequel::Model validates do presence_of( :name, :uuid, :vendor_id, :vendor_reference, :amount, :currency_code ) uniqueness_of( :uuid ) end def initialize( *args ) super( *args ) self.uuid = UUID.random_create.to_s end end As you can see I overwrite initialize to set up the UUID when the model is instantiated. In my tests I have the following method which sets up an Item: def generate_valid_new_item item = Item.new do |i| i.name = random_item_name i.description = random_description i.vendor_id = random_vendor_id i.vendor_reference = random_vendor_reference i.amount = random_amount i.currency_code = random_currency_code i.image_url = random_homepage_url end assert( item.valid?, item.errors.full_messages ) item end The problem is that when it gets to that assert on the 3rd last line it fails because item.uuid (which should exist) is nil. I put a breakpoint in the initialize method and it is never called(!?). I have no clue how the object is being initialised if new is called but initialize is not? The strange thing is that this only happens when I run my unit tests. If I run 'merb -i' (even with -e test) I can initialise an Item correctly: farrel at nicodemus ~/Projects/boxen $ merb -i -e test ~ loading gem 'merb_sequel' from config/init.rb:30 ... ~ loading gem 'merb_test_unit' from config/init.rb:41 ... ~ The merb_test_unit gem was not found. You may need to install it. ~ Loaded TEST Environment... ~ Connecting to the 'boxen_test' database on 'localhost' using 'postgres' ... ~ Compiling routes... ~ loading gem 'password' from config/init.rb:58 ... ~ loading gem 'validation_extensions' from config/init.rb:59 ... ~ loading gem 'uuidtools' from config/init.rb:60 ... ~ Using 'share-nothing' cookie sessions (4kb limit per client) irb(main):001:0> item = Item.new => #"ef62fa2e-594a-4305-b1bf-8a9b7aec8790"}> The UUID is definitely present there. Anyone else have some ideas? Farrel From j.nagash at gmail.com Sun Mar 2 22:36:53 2008 From: j.nagash at gmail.com (Justin "nagash" Jones) Date: Mon, 3 Mar 2008 12:36:53 +0900 Subject: (Noob) Image upload: rename file In-Reply-To: References: Message-ID: fileparams[:filename] contains the original filename. Justin On Mon, Mar 3, 2008 at 2:44 AM, Florian Schaf wrote: > Hi! > I'm building an app where the user can upload images. this works fine and > the uploaded file is copied from the temp directory to an > MerbRoot/uploads/id directory. my problem is that the filename is something > like Merb.5288.0. How can I rename it? my model is available at pastie. > I'm sure this question is not too sophisticated (-; > regards > flo schaf > > PS: The value of the size field is always 0. why? (thats not that > important) > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080303/771760e5/attachment-0001.html From ulf.moehring at mac.com Mon Mar 3 18:21:00 2008 From: ulf.moehring at mac.com (Ulf Moehring) Date: Mon, 3 Mar 2008 15:21:00 -0800 Subject: Recommendation for merb host Message-ID: <57805E73-96A6-4323-887D-2581234BEEF7@mac.com> Hi all, Do you have any recommendations for a shared hosting provider that supports merb apps? Thanks, Ulf From clint.hill at h3osoftware.com Mon Mar 3 22:24:26 2008 From: clint.hill at h3osoftware.com (Clint Hill) Date: Mon, 3 Mar 2008 20:24:26 -0700 Subject: Recommendation for merb host In-Reply-To: <57805E73-96A6-4323-887D-2581234BEEF7@mac.com> References: <57805E73-96A6-4323-887D-2581234BEEF7@mac.com> Message-ID: <5C1D3C04-B073-45F8-96CF-E0E37CBE249F@h3osoftware.com> http://www.engineyard.com http://www.joyent.com But I suppose that depends on your definition of "support". If you mean they have infrastructure to house it then anyone that provides Rails support will work. If you mean they will fix it when you break it then good luck. Clint Hill Development Manager http://h3osoftware.com clint.hill at h3osoftware.com (623) 698-5396 On Mar 3, 2008, at 4:21 PM, Ulf Moehring wrote: > Hi all, > > Do you have any recommendations for a shared hosting provider that > supports merb apps? > > Thanks, > Ulf > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel From geraldbauer2007 at gmail.com Mon Mar 10 17:26:14 2008 From: geraldbauer2007 at gmail.com (Gerald Bauer) Date: Mon, 10 Mar 2008 14:26:14 -0700 Subject: Vancouver.rb Q&A with Brock Whitten on Rails, Getting Off Rails (Merb), PmpknPi (Blog in Merb) and More (Part I) Message-ID: <7e7cb8940803101426g7c63203epdc7a8b4902d2fca5@mail.gmail.com> Hello, I've published a Q&A in the Vancouver.rb series with Brock Whitten. Questions include: * How did you get started with Ruby on Rails? What makes Ruby on Rails a great choice for developing web applications/sites? * Can you tell us some challenges you've faced developing using Ruby on Rails? * Off the Rails - Can you tell us a little bit about Merb? How did you get started? Any insight on how Merb compares with Rails and how it's better or worse? * What's PmpknPi? or Tell us more about PmpknPi? What are your future plans? Here's a quote: Rails is awesome. I try my very best not to say things like Merb is "better" than Rails but it is. Let's keep in mind that part of the reason it's great is because it is a lot like Rails and Merb was able to learn from the mistakes Rails learned the hard way. The most obvious advantage that Merb has is for writing APIs. If you were to build an API with Rails you are loading this entire (kitchen sink) framework for something very simple. Think alone of all those view helpers you won't be using yet they are being loaded for every instance of Mongrel. This is like driving a motor home to the cornerstone to buy milk. Merb on the other hand is broken into chunks (merb-core, merb-more, plugins) so you only load what you need. This makes Merb multiple times faster than Rails. More @ http://vanrb.wordpress.com/2008/03/10/brockwhitten/ Cheers. -- Gerald Bauer - Internet Professional - http://geraldbauer.wordpress.com From sergio.soujava at gmail.com Wed Mar 12 23:41:47 2008 From: sergio.soujava at gmail.com (Sergio Oliveira) Date: Thu, 13 Mar 2008 00:41:47 -0300 Subject: Reloading lib files Message-ID: Hi, I have some Ruby modules inside my merb application /lib directory. Problem is: Every time I make a change in these files I have to restart Merb. This becomes impossible after 1000 restarts in 10 minutes. Can anybody say some magic words to save me? Thanks, -Sergio -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080313/a347acda/attachment.html From hello at timperrett.com Thu Mar 13 05:24:09 2008 From: hello at timperrett.com (Tim Perrett) Date: Thu, 13 Mar 2008 09:24:09 +0000 Subject: Merb in production with God/Monit Message-ID: <2E573E04-519D-4F43-BDB0-EB6A3B3FDFDA@timperrett.com> Hey All, I just wanted to get other peoples take on problems when running merb in production? Just as Rails used to do, the mongrels tend to get heavy/unresponsive over time so need a good kicking by a watcher daemon like god or monit. However, I have had serious problems getting God to restart the process, as the "merb -k " command doesnt appear to work reliably and it cant kill off the old merb successfully so restarting the new one fails :'( What have other people experienced? How are you tackling these problems? Many thanks Tim From jimfreeze at gmail.com Thu Mar 13 09:29:39 2008 From: jimfreeze at gmail.com (Jim Freeze) Date: Thu, 13 Mar 2008 08:29:39 -0500 Subject: Reloading lib files In-Reply-To: References: Message-ID: <309844EA-4BE9-45FB-A069-F8062661D9E5@gmail.com> On Mar 12, 2008, at 10:41 PM, Sergio Oliveira wrote: > Hi, > > I have some Ruby modules inside my merb application /lib directory. > Problem is: Every time I make a change in these files I have to > restart Merb. The same problem occurs when you use libs in the local gems/ dir. When the file changes, it seems to be unloading the current libs, but not reloading them, because when I change a file, I have constants disappear. Jim > Thanks, > > -Sergio > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel From jimfreeze at gmail.com Thu Mar 13 09:30:50 2008 From: jimfreeze at gmail.com (Jim Freeze) Date: Thu, 13 Mar 2008 08:30:50 -0500 Subject: Merb in production with God/Monit In-Reply-To: <2E573E04-519D-4F43-BDB0-EB6A3B3FDFDA@timperrett.com> References: <2E573E04-519D-4F43-BDB0-EB6A3B3FDFDA@timperrett.com> Message-ID: <7177C0FE-9B75-4D60-B1FA-3513C8DFEF6F@gmail.com> On Mar 13, 2008, at 4:24 AM, Tim Perrett wrote: > Hey All, > > I just wanted to get other peoples take on problems when running merb > in production? Just as Rails used to do, the mongrels tend to get > heavy/unresponsive over time so need a good kicking by a watcher > daemon like god or monit. However, I have had serious problems getting > God to restart the process, as the "merb -k " command doesnt > appear to work reliably and it cant kill off the old merb successfully > so restarting the new one fails :'( Are you running one mongrel or multiple. I have a site that I haven't touched for 6months and it is running fine. Jim From hello at timperrett.com Thu Mar 13 09:52:05 2008 From: hello at timperrett.com (Tim Perrett) Date: Thu, 13 Mar 2008 13:52:05 +0000 Subject: Merb in production with God/Monit In-Reply-To: <7177C0FE-9B75-4D60-B1FA-3513C8DFEF6F@gmail.com> References: <2E573E04-519D-4F43-BDB0-EB6A3B3FDFDA@timperrett.com> <7177C0FE-9B75-4D60-B1FA-3513C8DFEF6F@gmail.com> Message-ID: <331FE297-2E14-42C0-B108-0D2A73DA5140@timperrett.com> The site is running more than one mongrel. I've solved the problem now :) I'll write up a blog post with my god config on there - I'll post back a link to it for archive reference. Cheers to all who replied Tim On 13 Mar 2008, at 13:30, Jim Freeze wrote: > Are you running one mongrel or multiple. I have a site that I > haven't touched > for 6months and it is running fine. > > Jim From me at seebq.com Thu Mar 13 09:59:46 2008 From: me at seebq.com (Charles Brian Quinn) Date: Thu, 13 Mar 2008 09:59:46 -0400 Subject: Merb in production with God/Monit In-Reply-To: <7177C0FE-9B75-4D60-B1FA-3513C8DFEF6F@gmail.com> References: <2E573E04-519D-4F43-BDB0-EB6A3B3FDFDA@timperrett.com> <7177C0FE-9B75-4D60-B1FA-3513C8DFEF6F@gmail.com> Message-ID: <3a2de0cd0803130659j17e0db13u69813300795b417d@mail.gmail.com> I'm running merb in production, and using monit to handle start on boot and to monitor. A couple of things: I had to upgrade (just recently) to 0.9.1 to fix a bug whereby a call to start would always clear the PID regardless of if it was already running -- you'd lose the PID of the current running process. The reason you're seeing problems with -k is that there are no PIDs, and it doesn't know how to stop them. Now, it works great and tells you it's already running and leaves the PID file alone. Here's my monit script (it's actually a capistrano script that sets up monit in general, and monit for mongrel and merb): http://pastie.textmate.org/165153 I've noticed when I start merb using this capistrano recipe I wrote: http://pastie.textmate.org/165156 It uses the cluster-nodes, so the ps processes all look like: /usr/bin/ruby /usr/bin/merb --merb-root /var/www/apps/my_app/current --daemonize --cluster-nodes 3 --port 4000 --environment production --log /var/www/apps/my_app/current/log/merb.log But when they get restarted, they use the individual merb command (without the cluster-nodes and with the --port 400x explicitly specified). They seem to work fine like that. The important thing is to tell monit to start merb using your uid and guid for the correct user when monit restarts. mongrel_cluster can handle changing to the appropriate user for you, but when you use merb directly, it cannot. I have an apache rule that circumvents calls to rails, as merb is insanely faster, but even if they go down, rails would (slowly) pick up the slack. Hope that helps. -- Charles Brian Quinn self-promotion: www.seebq.com highgroove studios: www.highgroove.com main: 404.394.4935 fax: 678.826.0969 Scout - Web Monitoring and Reporting Software www.scoutapp.com On 3/13/08, Jim Freeze wrote: > On Mar 13, 2008, at 4:24 AM, Tim Perrett wrote: > > > Hey All, > > > > I just wanted to get other peoples take on problems when running merb > > in production? Just as Rails used to do, the mongrels tend to get > > heavy/unresponsive over time so need a good kicking by a watcher > > daemon like god or monit. However, I have had serious problems getting > > God to restart the process, as the "merb -k " command doesnt > > appear to work reliably and it cant kill off the old merb successfully > > so restarting the new one fails :'( > > > Are you running one mongrel or multiple. I have a site that I haven't > touched > for 6months and it is running fine. > > > Jim > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel > From sergio.soujava at gmail.com Thu Mar 13 10:35:45 2008 From: sergio.soujava at gmail.com (Sergio Oliveira) Date: Thu, 13 Mar 2008 11:35:45 -0300 Subject: Reloading lib files In-Reply-To: <309844EA-4BE9-45FB-A069-F8062661D9E5@gmail.com> References: <309844EA-4BE9-45FB-A069-F8062661D9E5@gmail.com> Message-ID: Having to restart the server on every modification makes it much worse than Java. I miss the servlet API specification. -Sergio On Thu, Mar 13, 2008 at 10:29 AM, Jim Freeze wrote: > On Mar 12, 2008, at 10:41 PM, Sergio Oliveira wrote: > > > Hi, > > > > I have some Ruby modules inside my merb application /lib directory. > > Problem is: Every time I make a change in these files I have to > > restart Merb. > > The same problem occurs when you use libs in the local gems/ dir. > When the file changes, it seems to be unloading the current libs, > but not reloading them, because when I change a file, I have constants > disappear. > > Jim > > > > Thanks, > > > > -Sergio > > _______________________________________________ > > Merb-devel mailing list > > Merb-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/merb-devel > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080313/272cc134/attachment.html From james.herdman at gmail.com Thu Mar 13 18:37:01 2008 From: james.herdman at gmail.com (James Herdman) Date: Thu, 13 Mar 2008 18:37:01 -0400 Subject: Merb Projects and Autotest Message-ID: <546b89120803131537x315103a0g26dd0fe4e1ce190@mail.gmail.com> Hi! I'm rather new to Merb, but I thought I'd give it a shot. I found that autotest wasn't running my specs when my models were changing. Maybe this is because of how I have set up Merb, but in the even that it's not just me, I've adapted Autotest's mappings for Rails and have attached my efforts to this email. Unfortunately, you need to drop this file into the root of your project as ./.autotest. James -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080313/6679840a/attachment-0001.html -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: merb_autotest.txt Url: http://rubyforge.org/pipermail/merb-devel/attachments/20080313/6679840a/attachment-0001.txt From mattaimonetti at gmail.com Thu Mar 13 18:52:47 2008 From: mattaimonetti at gmail.com (Matt Aimonetti) Date: Thu, 13 Mar 2008 15:52:47 -0700 Subject: Merb Projects and Autotest In-Reply-To: <546b89120803131537x315103a0g26dd0fe4e1ce190@mail.gmail.com> References: <546b89120803131537x315103a0g26dd0fe4e1ce190@mail.gmail.com> Message-ID: Hey James, I noticed the exact same thing last night. I guess we could add that .autotest to the merb generator and have it generated at the same time as a project or by calling merb-gen autotest_conf or something like that. FYI you can fork Merb and send a pull request to wycats/ezmobius: http://github.com/wycats -Matt On 3/13/08, James Herdman wrote: > > Hi! > > I'm rather new to Merb, but I thought I'd give it a shot. I found that > autotest wasn't running my specs when my models were changing. Maybe this > is because of how I have set up Merb, but in the even that it's not just me, > I've adapted Autotest's mappings for Rails and have attached my efforts to > this email. Unfortunately, you need to drop this file into the root of your > project as ./.autotest. > > James > > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080313/1cae4f31/attachment.html From hello at timperrett.com Fri Mar 14 07:00:36 2008 From: hello at timperrett.com (Tim Perrett) Date: Fri, 14 Mar 2008 11:00:36 +0000 Subject: Merb in production with God/Monit In-Reply-To: <331FE297-2E14-42C0-B108-0D2A73DA5140@timperrett.com> References: <2E573E04-519D-4F43-BDB0-EB6A3B3FDFDA@timperrett.com> <7177C0FE-9B75-4D60-B1FA-3513C8DFEF6F@gmail.com> <331FE297-2E14-42C0-B108-0D2A73DA5140@timperrett.com> Message-ID: As promised, Ive posted my God config: http://blog.timperrett.com/2008/3/13/monitoring-merb-processes-in-the-wild-with-god The config presumes use of capistrano, hence the shared paths etc HTH someone Tim On 13 Mar 2008, at 13:52, Tim Perrett wrote: > The site is running more than one mongrel. I've solved the problem > now :) > > I'll write up a blog post with my god config on there - I'll post back > a link to it for archive reference. > > Cheers to all who replied > > Tim From oodelali at gmail.com Sun Mar 16 14:03:04 2008 From: oodelali at gmail.com (josh) Date: Sun, 16 Mar 2008 11:03:04 -0700 Subject: Merb Init Problems Message-ID: <78a02dc40803161103q4f293b5dy3a72bbf3ce4dd29d@mail.gmail.com> Hi All, I've come across the following problem with merb 0.5.3 (ruby 1.8.6 / Mac OS X Leopard). Basically, when I type 'merb' or 'merb -i' from within the app's root, It starts, compiles the routes and then exits. Any ideas??? This is a brand spanking new merb app: josh at JDS-MacBook:~/Projects/schmerb$ merb Merb started with these options: --- :exception_details: true :host: 0.0.0.0 :mongrel_x_sendfile: true :reloader: true :reloader_time: 0.5 :cache_templates: false :session_secret_key: /USERS/JOSH/PROJECTS/SCHMERB8520 :use_mutex: true :merb_root: /Users/josh/Projects/schmerb :session_id_cookie_only: true :port: "4000" :query_string_whitelist: [] :environment: development /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.3/lib/merb/version.rb:45: warning: already initialized constant RELEASE Started merb_init.rb ... Loading Application... Compiling routes.. josh at JDS-MacBook:~/Projects/schmerb$ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080316/9d080187/attachment.html From dirceuu at gmail.com Tue Mar 18 16:52:50 2008 From: dirceuu at gmail.com (Dirceu) Date: Tue, 18 Mar 2008 17:52:50 -0300 Subject: Merb and Javascript template system Message-ID: I've tryed to use the same logic in html layouts to handle javascript files without success. All I need is not repeat javascript code in various erb templates that have 90% of identical code. - I can't use more than 1 js file. - If isn't a way to do this like erb can do in html, what's the best way to "include" a file in another using Merb? -- from Brazil, Dirceu Pauka a ninja of the boo-box team http://boo-box.com Please don't print this e-mail Evite imprimir este e-mail -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080318/3f905db5/attachment.html From eoghan at redry.net Tue Mar 18 17:46:09 2008 From: eoghan at redry.net (eoghan) Date: Tue, 18 Mar 2008 21:46:09 +0000 Subject: rake tasks Message-ID: <1205876769.3074.52.camel@dhcppc0> Hi All, New to merb, I was wondering if there are any similar rake tasks to that of the rails rake stats? Im using merb version 0.5.3 Tried the aok task and am getting the following: eoghan-js-Computer:test_app eoghanj$ rake aok (in /project/merb/test_app) /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.3/lib/merb/version.rb:45: warning: already initialized constant RELEASE rake rcov (in /project/merb/test_app) /usr/local/lib/ruby/gems/1.8/gems/merb-0.5.3/lib/merb/version.rb:45: warning: already initialized constant RELEASE ruby: No such file or directory -- rcov (LoadError) rake aborted! Command ruby -I"lib:server/lib" -S rcov --exclude lib\/spec,bin \/spec,config\/boot.rb -o "coverage" "/usr/local/lib/ruby/gems/1.8/gems/rspec-1.1.1/bin/spec" -- "spec/controllers/goodbye_merb_spec.rb" "spec/helpers/goodbye_merb_helper_spec.rb" "spec/views/goodbye_merb/index_html_spec.rb" --format specdoc --colour failed (See full trace by running task with --trace) rake aborted! Command failed with status (1): [rake rcov...] /project/merb/test_app/rakefile:100 (See full trace by running task with --trace) eoghan-js-Computer:test_app eoghanj$ Thanks Eoghan From dirceuu at gmail.com Wed Mar 19 17:39:22 2008 From: dirceuu at gmail.com (Dirceu) Date: Wed, 19 Mar 2008 18:39:22 -0300 Subject: [resolved] Merb and Javascript template system In-Reply-To: References: Message-ID: Hi! Today I resolved my problem with layouts of Javascript using a "single" core modification and like to share it with you. My problem is in merb-0.5.3 and i don't know if this really is a problem or is a option of Merb developers. But, to solve *my* case. To use layouts of javascript files in merb 0.5.3only change that line: if engine.exempt_from_layout? || opts[:layout] == :none || [:js].include?(@_template_format) in File lib/merb/mixins/render.rb, to if engine.exempt_from_layout? || opts[:layout] == :none :) On Tue, Mar 18, 2008 at 5:52 PM, Dirceu wrote: > I've tryed to use the same logic in html layouts to handle javascript > files without success. > All I need is not repeat javascript code in various erb templates that > have 90% of identical code. > > - I can't use more than 1 js file. > - If isn't a way to do this like erb can do in html, what's the best way > to "include" a file in another using Merb? > > -- > from Brazil, Dirceu Pauka > a ninja of the boo-box team > http://boo-box.com > > Please don't print this e-mail > Evite imprimir este e-mail -- from Brazil, Dirceu Pauka a ninja of the boo-box team http://boo-box.com Please don't print this e-mail Evite imprimir este e-mail -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080319/2e3da8ad/attachment.html From phlip2005 at gmail.com Tue Mar 25 19:49:34 2008 From: phlip2005 at gmail.com (Phlip) Date: Tue, 25 Mar 2008 16:49:34 -0700 Subject: Where's a canonical sample app, like a blog or wiki, showing Merb 0.9 in action? Message-ID: The "invoice_tracker" app is giving me "uninitialized constant MERB_FRAMEWORK_ROOT", so I gotta figure that's for Merb Classic. Is there a "reference project" out there that inspires feature requests for Merb 0.9? -- Phlip From ez at engineyard.com Tue Mar 25 20:01:42 2008 From: ez at engineyard.com (Ezra Zygmuntowicz) Date: Tue, 25 Mar 2008 17:01:42 -0700 Subject: Where's a canonical sample app, like a blog or wiki, showing Merb 0.9 in action? In-Reply-To: References: Message-ID: The blerb blog app is pretty up to date with the latest stuffs: http://github.com/hornbeck/blerb-core/tree/master -Ezra On Mar 25, 2008, at 4:49 PM, Phlip wrote: > The "invoice_tracker" app is giving me "uninitialized constant > MERB_FRAMEWORK_ROOT", so I gotta figure that's for Merb Classic. > > Is there a "reference project" out there that inspires feature > requests for Merb 0.9? > > -- > Phlip > > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel From phlip2005 at gmail.com Tue Mar 25 22:36:22 2008 From: phlip2005 at gmail.com (Phlip) Date: Tue, 25 Mar 2008 19:36:22 -0700 Subject: Where's a canonical sample app, like a blog or wiki, showing Merb 0.9 in action? In-Reply-To: References: Message-ID: Ezra Zygmuntowicz wrote: > The blerb blog app is pretty up to date with the latest stuffs: > > http://github.com/hornbeck/blerb-core/tree/master Oookee got the latest gems (mostly 0.9.2!) and I git-ted the latest merb-core from the git thing and installed it... What's this? $ rake ... --format specdoc --colour failed /usr//lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/rake/spectask.rb:184:in `define' /usr//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1003:in `verbose' Installing gems with 'color' in their names don't help. -- Phlip From luislavena at gmail.com Tue Mar 25 22:55:55 2008 From: luislavena at gmail.com (Luis Lavena) Date: Tue, 25 Mar 2008 23:55:55 -0300 Subject: Where's a canonical sample app, like a blog or wiki, showing Merb 0.9 in action? In-Reply-To: References: Message-ID: <71166b3b0803251955l34ca063euc67ea862902b57c6@mail.gmail.com> On Tue, Mar 25, 2008 at 11:36 PM, Phlip wrote: > > Oookee got the latest gems (mostly 0.9.2!) and I git-ted the latest merb-core > from the git thing and installed it... > > What's this? > > $ rake > ... --format specdoc --colour failed > /usr//lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/rake/spectask.rb:184:in `define' > /usr//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1003:in `verbose' > > Installing gems with 'color' in their names don't help. > Do you have rspec installed too? -- Luis Lavena Multimedia systems - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams From brian.leroux at westcoastlogic.com Wed Mar 26 03:16:37 2008 From: brian.leroux at westcoastlogic.com (Brian LeRoux) Date: Wed, 26 Mar 2008 00:16:37 -0700 Subject: Where's a canonical sample app, like a blog or wiki, showing Merb 0.9 in action? In-Reply-To: <71166b3b0803251955l34ca063euc67ea862902b57c6@mail.gmail.com> References: <71166b3b0803251955l34ca063euc67ea862902b57c6@mail.gmail.com> Message-ID: Brock Whitten's pmpknpi blog app is worth checkin out / forking around with. http://github.com/sintaxi/pmpknpi/tree/master On Tue, Mar 25, 2008 at 7:55 PM, Luis Lavena wrote: > On Tue, Mar 25, 2008 at 11:36 PM, Phlip wrote: > > > > Oookee got the latest gems (mostly 0.9.2!) and I git-ted the latest merb-core > > from the git thing and installed it... > > > > What's this? > > > > $ rake > > ... --format specdoc --colour failed > > /usr//lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/rake/spectask.rb:184:in `define' > > /usr//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1003:in `verbose' > > > > Installing gems with 'color' in their names don't help. > > > > Do you have rspec installed too? > > -- > Luis Lavena > Multimedia systems > - > Human beings, who are almost unique in having the ability to learn from > the experience of others, are also remarkable for their apparent > disinclination to do so. > Douglas Adams > > > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel > From phlip2005 at gmail.com Wed Mar 26 03:54:26 2008 From: phlip2005 at gmail.com (Phlip) Date: Wed, 26 Mar 2008 00:54:26 -0700 Subject: Where's a canonical sample app, like a blog or wiki, showing Merb 0.9 in action? In-Reply-To: <71166b3b0803251955l34ca063euc67ea862902b57c6@mail.gmail.com> References: <71166b3b0803251955l34ca063euc67ea862902b57c6@mail.gmail.com> Message-ID: <47EA0132.9000105@gmail.com> Luis Lavena wrote: >> $ rake >> ... --format specdoc --colour failed >> /usr//lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/rake/spectask.rb:184:in `define' ^ >> /usr//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1003:in `verbose' >> Installing gems with 'color' in their names don't help. > Do you have rspec installed too? I thought I answered that in my post! Also, I'm aware --colour didn't fail, the entire ruby -I"blah blah blah..." command failed! Yet something in rake --trace threw away the e.message part of the exception, and only gave the backtrace... -- Phlip From phlip2005 at gmail.com Wed Mar 26 04:48:40 2008 From: phlip2005 at gmail.com (Phlip) Date: Wed, 26 Mar 2008 01:48:40 -0700 Subject: Where's a canonical sample app, like a blog or wiki, showing Merb 0.9 in action? In-Reply-To: References: <71166b3b0803251955l34ca063euc67ea862902b57c6@mail.gmail.com> Message-ID: Brian LeRoux wrote: > Brock Whitten's pmpknpi blog app is worth checkin out / forking around with. > > http://github.com/sintaxi/pmpknpi/tree/master Tx! Now that contained this issue: ./config/init.rb:require 'BlueCloth' That line needs the lecture on case sensitive filenames. require 'RedCloth' needed it too! Next... $ rake spec (in /home/phlip/projects/merb/sintaxi-pmpknpi-master) /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/options.rb:195:in `files_to_load': File or directory not found: spec/_spec.rb (RuntimeError) Googling for that gives one pastie entry. Someone fixed something before posting their pastie to a forum! But the _spec.rb looks more like a missing %replacer% than a cleverly-named config file or something... -- Phlip From Adam.Raczkowski at tufts.edu Thu Mar 27 20:16:49 2008 From: Adam.Raczkowski at tufts.edu (AJ Raczkowski) Date: Thu, 27 Mar 2008 20:16:49 -0400 Subject: Google Summer of Code Project Idea Message-ID: Hi all, My name is AJ, and I'm a computer science major at Tufts University. I really would love to do some work with Merb this summer. I've scanned over the Google Summer of Code ideas, and I feel that taking on a project like building a native forum application in Merb would be a good fit for me. Could I get some feedback if this is an appropriate project, and who might be a mentor for a project like this? Thanks! -AJ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080327/fa6e9771/attachment.html From phlip2005 at gmail.com Fri Mar 28 17:05:56 2008 From: phlip2005 at gmail.com (Phlip) Date: Fri, 28 Mar 2008 14:05:56 -0700 Subject: getting started with merb 0.9.2 Message-ID: Merbies: The relevant versions are merb 0.9.2 and rspec 1.1.3. I merb-gen a brand new application, with all the default options. Then I generate a controller with merb-gen controller grepper -S Running rake spec provides this: /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/options.rb:195:in `files_to_load': File or directory not found: spec/_spec.rb (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/options.rb:187:in `each' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/options.rb:187:in `files_to_load' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/options.rb:85:in `run_examples' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/command_line.rb:19:in `run' from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/bin/spec:4 rake aborted! Command ruby -I"lib:server/lib" "/usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/bin/spec" "spec/_spec.rb" --format specdoc --colour failed Any ideas how to get around it? -- Phlip From ml at syntheticplayground.com Fri Mar 28 18:07:04 2008 From: ml at syntheticplayground.com (Corey Jewett) Date: Fri, 28 Mar 2008 15:07:04 -0700 Subject: getting started with merb 0.9.2 In-Reply-To: References: Message-ID: <766F26C2-B791-4C07-8A11-C3C69024A37C@syntheticplayground.com> Either: rake specs OR rake spec TASK=task_name (without trailing _spec) Corey On Mar 28, 2008, at 14:05 , Phlip wrote: > Merbies: > > The relevant versions are merb 0.9.2 and rspec 1.1.3. > > I merb-gen a brand new application, with all the default options. > Then I > generate a controller with > > merb-gen controller grepper -S > > Running rake spec provides this: > > /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/options.rb: > 195:in > `files_to_load': File or directory not found: spec/_spec.rb > (RuntimeError) > from > /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/options.rb: > 187:in > `each' > from > /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/options.rb: > 187:in > `files_to_load' > from > /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/options.rb: > 85:in > `run_examples' > from > /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/lib/spec/runner/ > command_line.rb:19:in > `run' > from /usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/bin/spec:4 > rake aborted! > Command ruby -I"lib:server/lib" > "/usr/lib/ruby/gems/1.8/gems/rspec-1.1.3/bin/spec" "spec/_spec.rb" -- > format > specdoc --colour failed > > Any ideas how to get around it? > > -- > Phlip > > > > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel From phlip2005 at gmail.com Fri Mar 28 19:02:50 2008 From: phlip2005 at gmail.com (Phlip) Date: Fri, 28 Mar 2008 16:02:50 -0700 Subject: getting started with merb 0.9.2 References: <766F26C2-B791-4C07-8A11-C3C69024A37C@syntheticplayground.com> Message-ID: Corey Jewett wrote: > rake specs Thaanks! Now about those "clear error messages"... From phlip2005 at gmail.com Fri Mar 28 20:08:36 2008 From: phlip2005 at gmail.com (Phlip) Date: Fri, 28 Mar 2008 17:08:36 -0700 Subject: getting started with merb 0.9.2 References: Message-ID: Now what's this? /usr//lib/ruby/gems/1.8/gems/merb-core-0.9.2/lib/merb-core/core_ext/object.rb:89:in `const_get': uninitialized constant ViewExampleController Why is merb-core asking for a class that google sez belongs to rspec_on_rails - and a plugin no less! For shame!! -- Phlip From ml at syntheticplayground.com Fri Mar 28 23:58:21 2008 From: ml at syntheticplayground.com (Corey Jewett) Date: Fri, 28 Mar 2008 20:58:21 -0700 Subject: getting started with merb 0.9.2 In-Reply-To: References: Message-ID: <50310885-18C6-46EE-9E8B-ADF73D311614@syntheticplayground.com> On Mar 28, 2008, at 17:08 , Phlip wrote: > Now what's this? > > /usr//lib/ruby/gems/1.8/gems/merb-core-0.9.2/lib/merb-core/core_ext/ > object.rb:89:in > `const_get': uninitialized constant ViewExampleController > > Why is merb-core asking for a class that google sez belongs to > rspec_on_rails - and a plugin no less! For shame!! You might look closer at your setup, it's not anywhere in the merb gems. Check your ~/.irbrc corey at aquila ~/w/o/merb> ls -d ~/workspace/gem_homes/merb-latest/gems/ merb* /Users/corey/workspace/gem_homes/merb-latest/gems/merb-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb-action- args-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb-assets-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb-builder-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb-cache-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb-core-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb-gen-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb-haml-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb-mailer-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb-more-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb-parts-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/ merb_activerecord-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb_datamapper-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb_helpers-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/ merb_param_protection-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb_sequel-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb_stories-0.9.2/ /Users/corey/workspace/gem_homes/merb-latest/gems/merb_test_unit-0.9.2/ corey at aquila ~/w/o/merb> grep -r ViewExampleController ~/workspace/ gem_homes/merb-latest/gems/merb*/ corey at aquila ~/w/o/merb> grep -r ViewExampleController ~/workspace/oss/ merb/* # git clone; updated slightly after 1.9.2 release corey at aquila ~/w/o/merb> Corey From phlip2005 at gmail.com Sat Mar 29 11:54:32 2008 From: phlip2005 at gmail.com (Phlip) Date: Sat, 29 Mar 2008 08:54:32 -0700 Subject: getting started with merb 0.9.2 References: <50310885-18C6-46EE-9E8B-ADF73D311614@syntheticplayground.com> Message-ID: Corey Jewett wrote: >> `const_get': uninitialized constant ViewExampleController > corey at aquila ~/w/o/merb> grep -r ViewExampleController ~/workspace/ > gem_homes/merb-latest/gems/merb*/ $ locate -r merb.\*rb$ | xargs grep ViewExampleController /usr/lib/ruby/gems/1.8/gems/merb-core-0.9.2/lib/merb-core/test/example_groups/view_example_group.rb: def self.to_s; "ViewExampleController"; end Uh, now kill it? It's inside a test, inside an example... -- Phlip From phlip2005 at gmail.com Sat Mar 29 12:25:40 2008 From: phlip2005 at gmail.com (Phlip) Date: Sat, 29 Mar 2008 09:25:40 -0700 Subject: getting started with merb 0.9.2 References: Message-ID: > merb-gen controller grepper -S Just a note, before I google MockRequest, the default _spec.rb works, and the problem arrives when I add one it...do block: it 'should do something' do end -- Phlip From phlip2005 at gmail.com Sat Mar 29 12:50:09 2008 From: phlip2005 at gmail.com (Phlip) Date: Sat, 29 Mar 2008 09:50:09 -0700 Subject: Replace this with your real tests. Message-ID: Merbies: When I generate a controller with option -T, I get a nice "functional" test suite (meaning a suite that mocks a controller and a web server): class GrepperTest < Test::Unit::TestCase def setup @controller = Grepper.build(fake_request) @controller.dispatch('index') end # Replace this with your real tests. def test_should_be_setup assert false end end However, 'rake test' does not mind the 'assert false' there. 'rake test:functionals' does not exist, and 'ruby test/functional/grepper_test.rb' produces "no such file to load -- test/functional/../test_helper". Copying one in from 'app_generators/merb_plugin/templates/test/test_helper.rb' leads to "uninitialized constant Test" Should I just be entering these issues into a do-list somewhere? I'm only using generated code, so the odds of pilot error are kind'a low... -- Phlip From tesmith3 at buffalo.edu Sat Mar 29 13:26:33 2008 From: tesmith3 at buffalo.edu (Thomas Smith) Date: Sat, 29 Mar 2008 13:26:33 -0400 Subject: Google Summer of Code Project Idea Message-ID: <8e0da6050803291026y2f84cc47y9bcdf575287c1d8b@mail.gmail.com> I just applied for the same project. Do you have your heart set on it? It's the only one that caught my eye. > Hi all, > > My name is AJ, and I'm a computer science major at Tufts University. I > really would love to do some work with Merb this summer. I've scanned over > the Google Summer of Code ideas, and I feel that taking on a project like > building a native forum application in Merb would be a good fit for me. > Could I get some feedback if this is an appropriate project, and who might > be a mentor for a project like this? > > Thanks! > > -AJ From ez at engineyard.com Sat Mar 29 14:02:01 2008 From: ez at engineyard.com (Ezra Zygmuntowicz) Date: Sat, 29 Mar 2008 11:02:01 -0700 Subject: Replace this with your real tests. In-Reply-To: References: Message-ID: <3B37CD65-932D-4E18-9F86-F46006B876B7@engineyard.com> Yes make a list of what you run into. In all honesty not many folks use test/unit with merb and none of the core developers do. So I am not super surprised that it's not in the best working state ;) rspec definitely works fine. Please make a list of problems you have with test./unit and merb and we will work to fix the issues. Thanks -Ezra On Mar 29, 2008, at 9:50 AM, Phlip wrote: > Merbies: > > When I generate a controller with option -T, I get a nice > "functional" test > suite (meaning a suite that mocks a controller and a web server): > > class GrepperTest < Test::Unit::TestCase > > def setup > @controller = Grepper.build(fake_request) > @controller.dispatch('index') > end > > # Replace this with your real tests. > def test_should_be_setup > assert false > end > end > > However, 'rake test' does not mind the 'assert false' there. 'rake > test:functionals' does not exist, and 'ruby test/functional/ > grepper_test.rb' > produces "no such file to load -- test/functional/../test_helper". > > Copying one in from > 'app_generators/merb_plugin/templates/test/test_helper.rb' leads to > "uninitialized constant Test" > > Should I just be entering these issues into a do-list somewhere? I'm > only > using generated code, so the odds of pilot error are kind'a low... > > -- > Phlip > > > > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel - Ezra Zygmuntowicz -- Founder & Software Architect -- ezra at engineyard.com -- EngineYard.com From ml at syntheticplayground.com Sat Mar 29 17:04:57 2008 From: ml at syntheticplayground.com (Corey Jewett) Date: Sat, 29 Mar 2008 14:04:57 -0700 Subject: getting started with merb 0.9.2 In-Reply-To: References: <50310885-18C6-46EE-9E8B-ADF73D311614@syntheticplayground.com> Message-ID: <3D970CCD-3C9B-4B7D-9DA7-CB371ACD663F@syntheticplayground.com> On Mar 29, 2008, at 08:54 , Phlip wrote: > Corey Jewett wrote: > >>> `const_get': uninitialized constant ViewExampleController > >> corey at aquila ~/w/o/merb> grep -r ViewExampleController ~/workspace/ >> gem_homes/merb-latest/gems/merb*/ > > $ locate -r merb.\*rb$ | xargs grep ViewExampleController > > /usr/lib/ruby/gems/1.8/gems/merb-core-0.9.2/lib/merb-core/test/ > example_groups/view_example_group.rb: > def self.to_s; "ViewExampleController"; end > > Uh, now kill it? It's inside a test, inside an example... It was yanked out of git 2 days ago. http://github.com/wycats/merb-core/commit/6867c0b8c4f8a985b7e75c571be9aea9e077861e#diff-7 Corey From shayarnett at gmail.com Sat Mar 29 17:21:06 2008 From: shayarnett at gmail.com (Shay Arnett) Date: Sat, 29 Mar 2008 17:21:06 -0400 Subject: Google Summer of Code Project Idea In-Reply-To: <8e0da6050803291026y2f84cc47y9bcdf575287c1d8b@mail.gmail.com> References: <8e0da6050803291026y2f84cc47y9bcdf575287c1d8b@mail.gmail.com> Message-ID: <86cad1660803291421g7e08442fqa45a0a339520749b@mail.gmail.com> I started a merb forum a couple weekends ago. http://merbums.merborials.com I don't know all the details on the GSOC stuff, like if the project has to be the students, or if more than one GSOC participant can work on the same project or not. If there aren't any limiting rules in the GSOC guidelines, feel free to take a look at the project and join in if you would like. Shay On Sat, Mar 29, 2008 at 1:26 PM, Thomas Smith wrote: > I just applied for the same project. Do you have your heart set on it? > It's the only one that caught my eye. > > > > > Hi all, > > > > My name is AJ, and I'm a computer science major at Tufts University. I > > really would love to do some work with Merb this summer. I've scanned over > > the Google Summer of Code ideas, and I feel that taking on a project like > > building a native forum application in Merb would be a good fit for me. > > Could I get some feedback if this is an appropriate project, and who might > > be a mentor for a project like this? > > > > Thanks! > > > > -AJ > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel > From phlip2005 at gmail.com Sat Mar 29 22:34:53 2008 From: phlip2005 at gmail.com (Phlip) Date: Sat, 29 Mar 2008 19:34:53 -0700 Subject: getting started with merb 0.9.2 References: <50310885-18C6-46EE-9E8B-ADF73D311614@syntheticplayground.com> <3D970CCD-3C9B-4B7D-9DA7-CB371ACD663F@syntheticplayground.com> Message-ID: Corey Jewett wrote: >> def self.to_s; "ViewExampleController"; end >> >> Uh, now kill it? It's inside a test, inside an example... > > It was yanked out of git 2 days ago. > > http://github.com/wycats/merb-core/commit/6867c0b8c4f8a985b7e75c571be9aea9e077861e#diff-7 I concur. I just now yanked it off my hard drive. May I ask what's the best way to sync what's in this github with my 0.9.2 gemmage? -- Phlip From ml at syntheticplayground.com Sun Mar 30 00:09:10 2008 From: ml at syntheticplayground.com (Corey Jewett) Date: Sat, 29 Mar 2008 21:09:10 -0700 Subject: getting started with merb 0.9.2 In-Reply-To: References: <50310885-18C6-46EE-9E8B-ADF73D311614@syntheticplayground.com> <3D970CCD-3C9B-4B7D-9DA7-CB371ACD663F@syntheticplayground.com> Message-ID: <462AA5C9-708D-4AB8-B755-854D0CFB432F@syntheticplayground.com> On Mar 29, 2008, at 19:34 , Phlip wrote: > Corey Jewett wrote: > >>> def self.to_s; "ViewExampleController"; end >>> >>> Uh, now kill it? It's inside a test, inside an example... >> >> It was yanked out of git 2 days ago. >> >> http://github.com/wycats/merb-core/commit/6867c0b8c4f8a985b7e75c571be9aea9e077861e#diff-7 > > I concur. I just now yanked it off my hard drive. > > May I ask what's the best way to sync what's in this github with my > 0.9.2 > gemmage? http://gweezlebur.com/2008/3/1/quickie-sake-tasks-for-merb-hackers This is what I'm doing. My setup is abnormal in that I have set up a second gem repo (which is somewhat tricky and AFAIK undocumented). There are currently uncommitted patches in the merb lighthouse that fully support my setup. If you're not worried about your main rubygem library having a potentially unstable merb in it just fire up the sake tasks they are pretty well behaved. You will need git installed. Corey From tesmith3 at buffalo.edu Sun Mar 30 03:41:41 2008 From: tesmith3 at buffalo.edu (Thomas Smith) Date: Sun, 30 Mar 2008 03:41:41 -0400 Subject: Google Summer of Code Project Idea In-Reply-To: <8e0da6050803291026y2f84cc47y9bcdf575287c1d8b@mail.gmail.com> References: <8e0da6050803291026y2f84cc47y9bcdf575287c1d8b@mail.gmail.com> Message-ID: <8e0da6050803300041s7b2f3645s9fb249e4d25b73b5@mail.gmail.com> To the poster of the idea: is this forum intended for use on the Merb site? From phlip2005 at gmail.com Sun Mar 30 11:49:27 2008 From: phlip2005 at gmail.com (Phlip) Date: Sun, 30 Mar 2008 08:49:27 -0700 Subject: getting started with merb 0.9.2 References: <50310885-18C6-46EE-9E8B-ADF73D311614@syntheticplayground.com><3D970CCD-3C9B-4B7D-9DA7-CB371ACD663F@syntheticplayground.com> <462AA5C9-708D-4AB8-B755-854D0CFB432F@syntheticplayground.com> Message-ID: Corey Jewett wrote: > http://gweezlebur.com/2008/3/1/quickie-sake-tasks-for-merb-hackers Yay! Progress! Let's see what we can do about that! Modern Ruby apps make such awesome use of symbolic options as named arguments, that it sure would be nice to work in Ruby 1.9, where you can upgrade :symbol => 'option' to symbol: 'option'. But... $ sake1.9 -i http://merbivore.com/merb-dev.sake *** Sorry, ParseTree doesn't work with ruby 1.9.0 Now does anyone know why in hell does sake need ParseTree? To, uh, parse Ruby source? I'm not going to keep trying 1.9! I'll be good! Only push one envelop at a time! -- Phlip From ivey at gweezlebur.com Sun Mar 30 11:56:27 2008 From: ivey at gweezlebur.com (Michael D. Ivey) Date: Sun, 30 Mar 2008 10:56:27 -0500 Subject: getting started with merb 0.9.2 In-Reply-To: References: <50310885-18C6-46EE-9E8B-ADF73D311614@syntheticplayground.com><3D970CCD-3C9B-4B7D-9DA7-CB371ACD663F@syntheticplayground.com> <462AA5C9-708D-4AB8-B755-854D0CFB432F@syntheticplayground.com> Message-ID: <40586819-63AF-4D6B-A10E-6EC7FFBFC70A@gweezlebur.com> > Now does anyone know why in hell does sake need ParseTree? To, uh, > parse > Ruby source? Yes, although I'm not sure why it doesn't just load the snippets. You could also mkdir merb and load that sake file as Rakefile, and it would probably work w/ 1.9. Merb doesn't work w/ 1.9 yet, AIUI, though. From phlip2005 at gmail.com Sun Mar 30 13:01:41 2008 From: phlip2005 at gmail.com (Phlip) Date: Sun, 30 Mar 2008 10:01:41 -0700 Subject: how to spec @controller.dispatch(:index) ? Message-ID: Merbies: I have clawed my way to the next line in my spec: require File.join(File.dirname(__FILE__), "..", 'spec_helper.rb') require File.dirname(__FILE__) + '/../mock_request' describe Grepper, "index action" do before :each do @in = Merb::MockRequest.new # ? @res = StringIO.new # ? @controller = Merb::Controller.new(:controller => 'Grepper', :action => 'index') end it 'should do something' do # @controller.dispatch(:index) end end Despite the merb-gen (and http://merb.lighthouseapp.com/projects/7435-merb-more/tickets/95 ), I seem to have a @controller that does not croak. But does it control? And how do I invoke its action, 'index'? The classic code uses the line I commented out, with dispatch(), and naturally this doesn't work. Does anyone have a working example of a Merb 0.9 site with intact Controller specs in it? -- Phlip From jamie.macey at gmail.com Sun Mar 30 16:13:55 2008 From: jamie.macey at gmail.com (Jamie Macey) Date: Sun, 30 Mar 2008 16:13:55 -0400 Subject: how to spec @controller.dispatch(:index) ? In-Reply-To: References: Message-ID: <87D569C6-714C-4823-B443-6A94D60BB116@gmail.com> On 30-Mar-08, at 13:01 , Phlip wrote: > Merbies: > > I have clawed my way to the next line in my spec: I've got a pair of spec helpers that function in current (0.9.2) merb, for doing view and controller specs separately. def describe_action(controller, action, &block) describe "#{controller}##{action}" do before(:each) do @controller_class, @action = controller, action @session = {} end def dispatch(params = {}, env = {}) if obj = instance_variable_get( "@#{@controller_class.to_s.downcase.singularize}") params = {:id => obj.id}.merge(params) end @controller_class.any_instance.stubs(:session).returns(@session) @controller_class.any_instance.stubs(:render) @controller = dispatch_to(@controller_class, @action, params, env) if obj obj.reload unless obj.new_record? end end def post_dispatch(params = {}, env = {}) dispatch(params, env.merge(:REQUEST_METHOD => 'POST')) end instance_eval &block end end def describe_view(controller, template, &block) describe "/#{controller.to_s.downcase}/#{template}" do before(:each) do @controller_class, @template = controller, template @assigns = {} end def render(render_opts={}) controller = @controller_class.new(fake_request) @assigns.each do |key, value| controller.instance_variable_set("@#{key}", value) end if @template.to_s =~ /^_/ template = @template.to_s[1..-1].to_sym # strip leading _ @content = controller.partial(template, render_opts) else @content = controller.render(@template.to_sym, render_opts) end end instance_eval &block end end > require File.join(File.dirname(__FILE__), "..", 'spec_helper.rb') > require File.dirname(__FILE__) + '/../mock_request' > > describe Grepper, "index action" do > before :each do > @in = Merb::MockRequest.new # ? > @res = StringIO.new # ? > @controller = Merb::Controller.new(:controller => 'Grepper', > :action => 'index') > end > > it 'should do something' do > # @controller.dispatch(:index) > end > end You could probably get away with your example being: require File.join(File.dirname(__FILE__), "..", 'spec_helper.rb') describe_action Grepper, :index do it 'should do something' do dispatch end end I really should get around to blogging them - those helpers are bouncing around between two apps right now, and they've mostly stopped getting tweaks. -- Jamie From geraldbauer2007 at gmail.com Sun Mar 30 19:02:29 2008 From: geraldbauer2007 at gmail.com (Gerald Bauer) Date: Sun, 30 Mar 2008 16:02:29 -0700 Subject: =?WINDOWS-1252?Q?Merb_=96_All_You_Need, _None_You_Don't_-_Sl?= =?WINDOWS-1252?Q?ide_Deck_Now_Availabe_in_Web_Version_(S9)?= Message-ID: <7e7cb8940803301602y5db32913u2f6d1d6ac99bf3f1@mail.gmail.com> Hello, FYI: I've created a web version (using S9) of Ezra Zygmuntowicz' (Engine Yard) original PDF slide deck [1] from the Mountain West RubyConf 2008 talk titled "Merb ? All You Need, None You Don't". Slides include: * Guiding Principles of Merb Development * Merb's Motto * Who Cares About Efficiency * merb-core ? Rack Webserver Abstraction Layer * merb-core ? Powerful Router * merb-more ? What's New? * and many more More @ http://slideshow.rubyforge.org/merb.html Cheers. [1] http://brainspl.at/articles/2008/03/29/mountain-west-rubyconf-merb-slides PS: Note, S9 slide shows work in Opera without requiring any plugins (just hit F11). S9 is Opera Show Format-compatible. If you're curious, the slide show textile source is @ http://slideshow.rubyforge.org/svn/samples/merb.textile -- Gerald Bauer - Internet Professional - http://geraldbauer.wordpress.com From phlip2005 at gmail.com Sun Mar 30 20:18:43 2008 From: phlip2005 at gmail.com (Phlip) Date: Sun, 30 Mar 2008 17:18:43 -0700 Subject: how to spec @controller.dispatch(:index) ? In-Reply-To: <87D569C6-714C-4823-B443-6A94D60BB116@gmail.com> References: <87D569C6-714C-4823-B443-6A94D60BB116@gmail.com> Message-ID: Ben Burkert wrote: > try using dispatch_to instead of dispatch: > > http://github.com/hornbeck/blerb-core/tree/master/spec/controllers/articles_spec.rb Thanks but... ...That depends on missing goodies like controller_spec_helper.rb. Pretend, for a moment, that I were a newb who is just starting with Merb. How do I test a controller? The 0.9 way? The answer can't be "copy various things out of Blerb!"! -- Phlip From cwdinfo at gmail.com Mon Mar 31 18:54:32 2008 From: cwdinfo at gmail.com (s.ross) Date: Mon, 31 Mar 2008 15:54:32 -0700 Subject: Q: Rendering Partial to Javascript Message-ID: Hello-- I have a working partial that iterates a collection and spits out some lines of text. There's a periodic updater that watches a search box and hits a search controller (different from the first one) that is meant to update the div containing those lines of text with new ones from the search. Here's what I have: app/controllers/gem_searches.rb def index @gems = Gems.all(:limit => 25) render :index, :format => :js end app/views/gem_searches/index.js.erb $('gem-list').update('<%= partial "gem_files/gem_list" %>'); app/views/gem_files/_gem_list.html.haml - @gems.each do |gem| .someblockelement = gem.full_name It's supposed to use the same old partial template as is working on the non-Ajasx rendered page. Someplace in here, and it seems to be index.js.erb, I am getting "nil is not a symbol" and that's in partial (controller/mixins/render.rb). Any thoughts as to what's wrong here? Thanks From jed.hurt at gmail.com Mon Mar 31 20:10:53 2008 From: jed.hurt at gmail.com (Jed Hurt) Date: Mon, 31 Mar 2008 18:10:53 -0600 Subject: Revert of ExampleGroup changes Message-ID: Does this revert remove the ability to spec views in isolation? http://github.com/wycats/merb-core/commit/6867c0b8c4f8a985b7e75c571be9aea9e077861e If so, is Tim Connor's method currently my best bet? http://www.timocracy.com/articles/2007/12/17/isolated-controller-and-view-testing-in-merb -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20080331/52d14b58/attachment.html