From brian.takita at gmail.com Fri May 4 18:29:29 2007 From: brian.takita at gmail.com (Brian Takita) Date: Fri, 4 May 2007 15:29:29 -0700 Subject: Rspec on Merb Plugin - Initial thoughts? Message-ID: <1d7ddd110705041529m296be785s93a2f109a5af439b@mail.gmail.com> A couple days ago I submitted a patch, that was committed by Ezra, to the MrBlog project for the Rspec on Merb plugin. So far, it only works with ActiveRecord including fixtures. Has any played with it? If so, did you get it to work? I'm going to be submitting a patch for Controller specs soon. It will be very bare bones, given my current lack of understanding of Merb controller development. View and Helper specs will follow. I saw the question on IRC, but should ROM be folded into Merb itself, or act as a plugin? There are advantages and disadvantages to both. A pull to integrate classes into Merb is that these classes can be reused by Test::Unit tests and Rspec. A pull to keep classes in a plugin is It can change whenever Merb or Rspec changes. Since both Merb and Rspec are rapidly evolving, there may be a need for the plugin for a while. Since Test::Unit is fairly static, there may not be a need to make the Test::Unit library a plugin. One flaw with Rails, that I hope does not get repeated in Merb, is the tight coupling with Test;:Unit (same with tight coupling with Rspec). Of course Rspec did not exist when Rails was first developed, so this should not be much of a problem as long as we are vigilant. :) Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20070504/58968152/attachment.html From ez at engineyard.com Fri May 4 22:26:30 2007 From: ez at engineyard.com (Ezra Zygmuntowicz) Date: Fri, 4 May 2007 19:26:30 -0700 Subject: Rspec on Merb Plugin - Initial thoughts? In-Reply-To: <1d7ddd110705041529m296be785s93a2f109a5af439b@mail.gmail.com> References: <1d7ddd110705041529m296be785s93a2f109a5af439b@mail.gmail.com> Message-ID: On May 4, 2007, at 3:29 PM, Brian Takita wrote: > A couple days ago I submitted a patch, that was committed by Ezra, > to the MrBlog project for the Rspec on Merb plugin. > So far, it only works with ActiveRecord including fixtures. > Has any played with it? If so, did you get it to work? > > I'm going to be submitting a patch for Controller specs soon. It > will be very bare bones, given my current lack of understanding of > Merb controller development. > View and Helper specs will follow. > > I saw the question on IRC, but should ROM be folded into Merb > itself, or act as a plugin? There are advantages and disadvantages > to both. > > A pull to integrate classes into Merb is that these classes can be > reused by Test::Unit tests and Rspec. > A pull to keep classes in a plugin is It can change whenever Merb > or Rspec changes. Since both Merb and Rspec are rapidly evolving, > there may be a need for the plugin for a while. > Since Test::Unit is fairly static, there may not be a need to make > the Test::Unit library a plugin. > > One flaw with Rails, that I hope does not get repeated in Merb, is > the tight coupling with Test;:Unit (same with tight coupling with > Rspec). Of course Rspec did not exist when Rails was first > developed, so this should not be much of a problem as long as we > are vigilant. :) > > Brian > Hey Brian- I was able to get the user specs running in mrblog trunk. I commited a rake task to run them as 'rake specs'. The presence of a spec harness makes the need for proper environments in merb urgent. I will hack up environments with different db settings this weekend so it will make testing and deving easier. I think that we should keep it as a plugin for a little while. I don't want to go down the tightly coupled road in merb's testing capabilities. I think there are some core helper classes I need to write that could go in the framework and be used by test/unit or rspec or whatver. Like a helper for making requests thru the dispacther and controllers to test output without booting a webserver, and some other stuff that will help with testing. I'd like to see the test helpers that are merb specific made into libraries within merb that you can use from test/unit, test/spec or rspec. Thanks for getting this started Brian, it's a nice plugin. If you have any questions about merb internals please feel free to ask and I will help you grok it quickly. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From brian.takita at gmail.com Mon May 7 03:02:29 2007 From: brian.takita at gmail.com (Brian Takita) Date: Mon, 7 May 2007 00:02:29 -0700 Subject: Rspec on Merb Plugin - Initial thoughts? In-Reply-To: References: <1d7ddd110705041529m296be785s93a2f109a5af439b@mail.gmail.com> Message-ID: <1d7ddd110705070002l47cb4060h8779fb1511ac3ce2@mail.gmail.com> On 5/4/07, Ezra Zygmuntowicz wrote: > > > On May 4, 2007, at 3:29 PM, Brian Takita wrote: > > > A couple days ago I submitted a patch, that was committed by Ezra, > > to the MrBlog project for the Rspec on Merb plugin. > > So far, it only works with ActiveRecord including fixtures. > > Has any played with it? If so, did you get it to work? > > > > I'm going to be submitting a patch for Controller specs soon. It > > will be very bare bones, given my current lack of understanding of > > Merb controller development. > > View and Helper specs will follow. > > > > I saw the question on IRC, but should ROM be folded into Merb > > itself, or act as a plugin? There are advantages and disadvantages > > to both. > > > > A pull to integrate classes into Merb is that these classes can be > > reused by Test::Unit tests and Rspec. > > A pull to keep classes in a plugin is It can change whenever Merb > > or Rspec changes. Since both Merb and Rspec are rapidly evolving, > > there may be a need for the plugin for a while. > > Since Test::Unit is fairly static, there may not be a need to make > > the Test::Unit library a plugin. > > > > One flaw with Rails, that I hope does not get repeated in Merb, is > > the tight coupling with Test;:Unit (same with tight coupling with > > Rspec). Of course Rspec did not exist when Rails was first > > developed, so this should not be much of a problem as long as we > > are vigilant. :) > > > > Brian > > > > Hey Brian- > > I was able to get the user specs running in mrblog trunk. I > commited > a rake task to run them as 'rake specs'. The presence of a spec > harness makes the need for proper environments in merb urgent. I will > hack up environments with different db settings this weekend so it > will make testing and deving easier. > > I think that we should keep it as a plugin for a little while. I > don't want to go down the tightly coupled road in merb's testing > capabilities. I think there are some core helper classes I need to > write that could go in the framework and be used by test/unit or > rspec or whatver. Like a helper for making requests thru the > dispacther and controllers to test output without booting a > webserver, and some other stuff that will help with testing. > > I'd like to see the test helpers that are merb specific made into > libraries within merb that you can use from test/unit, test/spec or > rspec. > > Thanks for getting this started Brian, it's a nice plugin. If you > have any questions about merb internals please feel free to ask and I > will help you grok it quickly. Great. Thanks Ezra. I submitted a patch for a frist stab at controller specs. http://merb.devjavu.com/projects/merb/ticket/45 Here are some things of consideration: - response.should redirect_to and response.should render_template and not implemented yet. - The controller Description class has a controller_class accessor. If the first argument of describe is set to the controller class, the examples will know that the requests are for the controller. - I couldn't figure out how to construct the correct uri given the controller and the action. Cheers- > -- Ezra Zygmuntowicz > -- Lead Rails Evangelist > -- ez at engineyard.com > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273) > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20070507/be9fa451/attachment.html From goconnor at plumtv.com Tue May 8 18:27:20 2007 From: goconnor at plumtv.com (Gregory O'Connor) Date: Tue, 8 May 2007 18:27:20 -0400 Subject: Rspec on Merb Plugin - Initial thoughts? Message-ID: <764A0C66-EA9B-4F00-86DE-6CC639BCEF8C@plumtv.com> Hey Brian and Ezra, thank you both for this very interesting code. it's exciting to easily upload a couple of 1.5G files at the same time. rake specs fails for me as the fixtures/users.yml is not loaded (after editing the test/spec/spec_helper.rb for my database). also looking at why the progress bar doesn't work for me out of the box. of course the file upload ability is awesome. regards, gregory o'connor > On 5/4/07, Ezra Zygmuntowicz wrote: > > > > > > On May 4, 2007, at 3:29 PM, Brian Takita wrote: > > > > > A couple days ago I submitted a patch, that was committed by Ezra, > > > to the MrBlog project for the Rspec on Merb plugin. > > > So far, it only works with ActiveRecord including fixtures. > > > Has any played with it? If so, did you get it to work? > > > > > > I'm going to be submitting a patch for Controller specs soon. It > > > will be very bare bones, given my current lack of understanding of > > > Merb controller development. > > > View and Helper specs will follow. > > > > > > I saw the question on IRC, but should ROM be folded into Merb > > > itself, or act as a plugin? There are advantages and disadvantages > > > to both. > > > > > > A pull to integrate classes into Merb is that these classes can be > > > reused by Test::Unit tests and Rspec. > > > A pull to keep classes in a plugin is It can change whenever Merb > > > or Rspec changes. Since both Merb and Rspec are rapidly evolving, > > > there may be a need for the plugin for a while. > > > Since Test::Unit is fairly static, there may not be a need to make > > > the Test::Unit library a plugin. > > > > > > One flaw with Rails, that I hope does not get repeated in Merb, is > > > the tight coupling with Test;:Unit (same with tight coupling with > > > Rspec). Of course Rspec did not exist when Rails was first > > > developed, so this should not be much of a problem as long as we > > > are vigilant. :) > > > > > > Brian > > > > > > > Hey Brian- > > > > I was able to get the user specs running in mrblog trunk. I > > commited > > a rake task to run them as 'rake specs'. The presence of a spec > > harness makes the need for proper environments in merb urgent. I > will > > hack up environments with different db settings this weekend so it > > will make testing and deving easier. > > > > I think that we should keep it as a plugin for a little > while. I > > don't want to go down the tightly coupled road in merb's testing > > capabilities. I think there are some core helper classes I need to > > write that could go in the framework and be used by test/unit or > > rspec or whatver. Like a helper for making requests thru the > > dispacther and controllers to test output without booting a > > webserver, and some other stuff that will help with testing. > > > > I'd like to see the test helpers that are merb specific > made into > > libraries within merb that you can use from test/unit, test/spec or > > rspec. > > > > Thanks for getting this started Brian, it's a nice > plugin. If you > > have any questions about merb internals please feel free to ask > and I > > will help you grok it quickly. > > > Great. Thanks Ezra. > > I submitted a patch for a frist stab at controller specs. > http://merb.devjavu.com/projects/merb/ticket/45 > > Here are some things of consideration: > > - response.should redirect_to and response.should > render_template and > not implemented yet. > - The controller Description class has a controller_class > accessor. If > the first argument of describe is set to the controller class, > the examples > will know that the requests are for the controller. > - I couldn't figure out how to construct the correct uri given the > controller and the action. > > > Cheers- > > -- Ezra Zygmuntowicz > > -- Lead Rails Evangelist > > -- ez at engineyard.com > > -- Engine Yard, Serious Rails Hosting > > -- (866) 518-YARD (9273) > > > > > > From brian.takita at gmail.com Wed May 9 03:26:24 2007 From: brian.takita at gmail.com (Brian Takita) Date: Wed, 9 May 2007 00:26:24 -0700 Subject: Rspec on Merb Plugin - Initial thoughts? In-Reply-To: <764A0C66-EA9B-4F00-86DE-6CC639BCEF8C@plumtv.com> References: <764A0C66-EA9B-4F00-86DE-6CC639BCEF8C@plumtv.com> Message-ID: <1d7ddd110705090026j287b7b08pfebf79a647bca082@mail.gmail.com> Grag, Thanks for trying the Rspec on Merb plugin out. Did you get any exceptions related to loading the fixtures? Are you using the fixtures method in the Behaviour block? Maybe it would be easier post your spec at: http://pastie.caboo.se/ and reply with the link. Thanks, Brian On 5/8/07, Gregory O'Connor wrote: > > Hey Brian and Ezra, > thank you both for this very interesting code. > it's exciting to easily upload a couple of 1.5G files at the same time. > > rake specs > fails for me as the fixtures/users.yml is not loaded (after editing > the test/spec/spec_helper.rb for my database). > > also looking at why the progress bar doesn't work for me out of the > box. of course the file upload ability is awesome. > > regards, > gregory o'connor > > On 5/4/07, Ezra Zygmuntowicz wrote: > > > > > > > > > On May 4, 2007, at 3:29 PM, Brian Takita wrote: > > > > > > > A couple days ago I submitted a patch, that was committed by Ezra, > > > > to the MrBlog project for the Rspec on Merb plugin. > > > > So far, it only works with ActiveRecord including fixtures. > > > > Has any played with it? If so, did you get it to work? > > > > > > > > I'm going to be submitting a patch for Controller specs soon. It > > > > will be very bare bones, given my current lack of understanding of > > > > Merb controller development. > > > > View and Helper specs will follow. > > > > > > > > I saw the question on IRC, but should ROM be folded into Merb > > > > itself, or act as a plugin? There are advantages and disadvantages > > > > to both. > > > > > > > > A pull to integrate classes into Merb is that these classes can be > > > > reused by Test::Unit tests and Rspec. > > > > A pull to keep classes in a plugin is It can change whenever Merb > > > > or Rspec changes. Since both Merb and Rspec are rapidly evolving, > > > > there may be a need for the plugin for a while. > > > > Since Test::Unit is fairly static, there may not be a need to make > > > > the Test::Unit library a plugin. > > > > > > > > One flaw with Rails, that I hope does not get repeated in Merb, is > > > > the tight coupling with Test;:Unit (same with tight coupling with > > > > Rspec). Of course Rspec did not exist when Rails was first > > > > developed, so this should not be much of a problem as long as we > > > > are vigilant. :) > > > > > > > > Brian > > > > > > > > > > Hey Brian- > > > > > > I was able to get the user specs running in mrblog trunk. I > > > commited > > > a rake task to run them as 'rake specs'. The presence of a spec > > > harness makes the need for proper environments in merb urgent. I > > will > > > hack up environments with different db settings this weekend so it > > > will make testing and deving easier. > > > > > > I think that we should keep it as a plugin for a little > > while. I > > > don't want to go down the tightly coupled road in merb's testing > > > capabilities. I think there are some core helper classes I need to > > > write that could go in the framework and be used by test/unit or > > > rspec or whatver. Like a helper for making requests thru the > > > dispacther and controllers to test output without booting a > > > webserver, and some other stuff that will help with testing. > > > > > > I'd like to see the test helpers that are merb specific > > made into > > > libraries within merb that you can use from test/unit, test/spec or > > > rspec. > > > > > > Thanks for getting this started Brian, it's a nice > > plugin. If you > > > have any questions about merb internals please feel free to ask > > and I > > > will help you grok it quickly. > > > > > > Great. Thanks Ezra. > > > > I submitted a patch for a frist stab at controller specs. > > http://merb.devjavu.com/projects/merb/ticket/45 > > > > Here are some things of consideration: > > > > - response.should redirect_to and response.should > > render_template and > > not implemented yet. > > - The controller Description class has a controller_class > > accessor. If > > the first argument of describe is set to the controller class, > > the examples > > will know that the requests are for the controller. > > - I couldn't figure out how to construct the correct uri given the > > controller and the action. > > > > > > Cheers- > > > -- Ezra Zygmuntowicz > > > -- Lead Rails Evangelist > > > -- ez at engineyard.com > > > -- Engine Yard, Serious Rails Hosting > > > -- (866) 518-YARD (9273) > > > > > > > > > > > > _______________________________________________ > 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/20070509/59cdb8e2/attachment.html From goconnor at plumtv.com Wed May 9 09:07:16 2007 From: goconnor at plumtv.com (Gregory O'Connor) Date: Wed, 9 May 2007 09:07:16 -0400 Subject: Rspec on Merb Plugin - Initial thoughts? In-Reply-To: <1d7ddd110705090026j287b7b08pfebf79a647bca082@mail.gmail.com> References: <764A0C66-EA9B-4F00-86DE-6CC639BCEF8C@plumtv.com> <1d7ddd110705090026j287b7b08pfebf79a647bca082@mail.gmail.com> Message-ID: Hi Brian, thank you for rspec on merb. hoping to follow your example, the starting point is simply merb and mrblog at Revision 233 with the single change to spec_helper.rb for my local mrblog_test database the only spec is the checked out user_spec.rb > Did you get any exceptions related to loading the fixtures? > Are you using the fixtures method in the Behaviour block? there are no exceptions related to loading the fixtures the tables are not created (see below) user_spec.rb does use the fixture method in the Behavior block. output from a spec -b on this spec file is shown below with edits to reduce the length of this post. let me know if i've missed something in my setup or if i can provide more information. regards, greg $ pwd ~/Sites/mrblog/trunk $ spec -v RSpec-0.9.3 (r1916) - BDD for Ruby $ spec -b test/spec/models/user_spec.rb merb init called ActiveRecord session mixed in Rails session compatibilty on. FFFFFFFF 1) ActiveRecord::StatementInvalid in 'User being authenticated should create user' Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM users /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/abstract_adapter.rb:128:in `log' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/mysql_adapter.rb:243:in `execute' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/connection_adapters/mysql_adapter.rb:348:in `columns' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/base.rb:763:in `columns' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/calculations.rb:257:in `column_for' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/calculations.rb:116:in `calculate' /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/calculations.rb:45:in `count' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/matchers/ change.rb:28:in `send' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/matchers/ change.rb:28:in `execute_change' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/matchers/ change.rb:20:in `matches?' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/expectations/ handler.rb:14:in `handle_matcher' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/expectations/ extensions/object.rb:32:in `should' ./test/spec/models/user_spec.rb:8: /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb: 73:in `instance_eval' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb: 73:in `run_example' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb: 23:in `run' /opt/local/lib/ruby/1.8/timeout.rb:48:in `timeout' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb: 21:in `run' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/ behaviour.rb:70:in `run' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/ behaviour.rb:67:in `each' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/ behaviour.rb:67:in `run' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/ behaviour_runner.rb:45:in `run_behaviours' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/ behaviour_runner.rb:44:in `each' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/ behaviour_runner.rb:44:in `run_behaviours' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/ behaviour_runner.rb:27:in `run' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/ command_line.rb:17:in `run' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/bin/spec:3: /opt/local/bin/spec:16:in `load' /opt/local/bin/spec:16: 2) ActiveRecord::StatementInvalid in 'User being authenticated should require login' Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM users 3) ActiveRecord::StatementInvalid in 'User being authenticated should require password' Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM users 4) ActiveRecord::StatementInvalid in 'User being authenticated should require password confirmation' Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM users 5) ActiveRecord::StatementInvalid in 'User being authenticated should require email' Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM users 6) NoMethodError in 'User being authenticated should reset password' undefined method `[]' for nil:NilClass /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/ active_record/fixtures.rb:498:in `users' ./test/spec/models/user_spec.rb:32: /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb: 73:in `instance_eval' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb: 73:in `run_example' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb: 23:in `run' /opt/local/lib/ruby/1.8/timeout.rb:48:in `timeout' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb: 21:in `run' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/ behaviour.rb:70:in `run' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/ behaviour.rb:67:in `each' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/ behaviour.rb:67:in `run' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/ behaviour_runner.rb:45:in `run_behaviours' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/ behaviour_runner.rb:44:in `each' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/ behaviour_runner.rb:44:in `run_behaviours' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/ behaviour_runner.rb:27:in `run' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/ command_line.rb:17:in `run' /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/bin/spec:3: /opt/local/bin/spec:16:in `load' /opt/local/bin/spec:16: 7) NoMethodError in 'User being authenticated should not rehash password' undefined method `[]' for nil:NilClass 8) NoMethodError in 'User being authenticated should authenticate user' undefined method `[]' for nil:NilClass Finished in 0.14894 seconds 8 examples, 8 failures On May 9, 2007, at 3:26 AM, Brian Takita wrote: > Grag, > > Thanks for trying the Rspec on Merb plugin out. > > Did you get any exceptions related to loading the fixtures? > Are you using the fixtures method in the Behaviour block? > > Maybe it would be easier post your spec at: > http://pastie.caboo.se/ > and reply with the link. > > Thanks, > Brian > > On 5/8/07, Gregory O'Connor < goconnor at plumtv.com> wrote: > Hey Brian and Ezra, > thank you both for this very interesting code. > it's exciting to easily upload a couple of 1.5G files at the same > time. > > rake specs > fails for me as the fixtures/users.yml is not loaded (after editing > the test/spec/spec_helper.rb for my database). > > also looking at why the progress bar doesn't work for me out of the > box. of course the file upload ability is awesome. > > regards, > gregory o'connor > > On 5/4/07, Ezra Zygmuntowicz wrote: > > > > > > > > > On May 4, 2007, at 3:29 PM, Brian Takita wrote: > > > > > > > A couple days ago I submitted a patch, that was committed by > Ezra, > > > > to the MrBlog project for the Rspec on Merb plugin. > > > > So far, it only works with ActiveRecord including fixtures. > > > > Has any played with it? If so, did you get it to work? > > > > > > > > I'm going to be submitting a patch for Controller specs soon. It > > > > will be very bare bones, given my current lack of > understanding of > > > > Merb controller development. > > > > View and Helper specs will follow. > > > > > > > > I saw the question on IRC, but should ROM be folded into Merb > > > > itself, or act as a plugin? There are advantages and > disadvantages > > > > to both. > > > > > > > > A pull to integrate classes into Merb is that these classes > can be > > > > reused by Test::Unit tests and Rspec. > > > > A pull to keep classes in a plugin is It can change whenever > Merb > > > > or Rspec changes. Since both Merb and Rspec are rapidly > evolving, > > > > there may be a need for the plugin for a while. > > > > Since Test::Unit is fairly static, there may not be a need to > make > > > > the Test::Unit library a plugin. > > > > > > > > One flaw with Rails, that I hope does not get repeated in > Merb, is > > > > the tight coupling with Test;:Unit (same with tight coupling > with > > > > Rspec). Of course Rspec did not exist when Rails was first > > > > developed, so this should not be much of a problem as long as we > > > > are vigilant. :) > > > > > > > > Brian > > > > > > > > > > Hey Brian- > > > > > > I was able to get the user specs running in mrblog > trunk. I > > > commited > > > a rake task to run them as 'rake specs'. The presence of a spec > > > harness makes the need for proper environments in merb urgent. I > > will > > > hack up environments with different db settings this weekend so it > > > will make testing and deving easier. > > > > > > I think that we should keep it as a plugin for a little > > while. I > > > don't want to go down the tightly coupled road in merb's testing > > > capabilities. I think there are some core helper classes I need to > > > write that could go in the framework and be used by test/unit or > > > rspec or whatver. Like a helper for making requests thru the > > > dispacther and controllers to test output without booting a > > > webserver, and some other stuff that will help with testing. > > > > > > I'd like to see the test helpers that are merb specific > > made into > > > libraries within merb that you can use from test/unit, test/ > spec or > > > rspec. > > > > > > Thanks for getting this started Brian, it's a nice > > plugin. If you > > > have any questions about merb internals please feel free to ask > > and I > > > will help you grok it quickly. > > > > > > Great. Thanks Ezra. > > > > I submitted a patch for a frist stab at controller specs. > > http://merb.devjavu.com/projects/merb/ticket/45 > > > > Here are some things of consideration: > > > > - response.should redirect_to and response.should > > render_template and > > not implemented yet. > > - The controller Description class has a controller_class > > accessor. If > > the first argument of describe is set to the controller class, > > the examples > > will know that the requests are for the controller. > > - I couldn't figure out how to construct the correct uri given > the > > controller and the action. > > > > > > Cheers- > > > -- Ezra Zygmuntowicz > > > -- Lead Rails Evangelist > > > -- ez at engineyard.com > > > -- Engine Yard, Serious Rails Hosting > > > -- (866) 518-YARD (9273) > > > > > > > > > > > > _______________________________________________ > 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/20070509/c842fed4/attachment-0001.html From brian.takita at gmail.com Wed May 9 12:42:29 2007 From: brian.takita at gmail.com (Brian Takita) Date: Wed, 9 May 2007 09:42:29 -0700 Subject: Rspec on Merb Plugin - Initial thoughts? In-Reply-To: References: <764A0C66-EA9B-4F00-86DE-6CC639BCEF8C@plumtv.com> <1d7ddd110705090026j287b7b08pfebf79a647bca082@mail.gmail.com> Message-ID: <1d7ddd110705090942u6d880f58wda61931a2309cbab@mail.gmail.com> It looks like your test database does not have the users table. I think you need to migrate your test database. Rails will clone the test database from the development database. I'm not sure if Merb does this. On 5/9/07, Gregory O'Connor wrote: > > Hi Brian, > thank you for rspec on merb. hoping to follow your example, the starting > point is simply merb and > mrblog at Revision 233 with the single change to spec_helper.rb for my > local mrblog_test database > the only spec is the checked out user_spec.rb > > Did you get any exceptions related to loading the fixtures? > Are you using the fixtures method in the Behaviour block? > > there are no exceptions related to loading the fixtures the tables are not > created (see below) > user_spec.rb does use the fixture method in the Behavior block. > > output from a spec -b on this spec file is shown below with edits to > reduce the length of this post. > let me know if i've missed something in my setup or if i can provide more > information. > regards, > greg > > $ pwd > ~/Sites/mrblog/trunk > > $ spec -v > RSpec-0.9.3 (r1916) - BDD for Ruby > > $ spec -b test/spec/models/user_spec.rb > merb init called > ActiveRecord session mixed in > Rails session compatibilty on. > FFFFFFFF > > 1) > ActiveRecord::StatementInvalid in 'User being authenticated should create > user' > Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM > users > /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract_adapter.rb:128:in > `log' > /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:243:in > `execute' > /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:348:in > `columns' > /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:763:in > `columns' > /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/calculations.rb:257:in > `column_for' > /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/calculations.rb:116:in > `calculate' > /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/calculations.rb:45:in > `count' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/matchers/change.rb:28:in > `send' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/matchers/change.rb:28:in > `execute_change' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/matchers/change.rb:20:in > `matches?' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/expectations/handler.rb:14:in > `handle_matcher' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/expectations/extensions/object.rb:32:in > `should' > ./test/spec/models/user_spec.rb:8: > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:73:in > `instance_eval' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:73:in > `run_example' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:23:in > `run' > /opt/local/lib/ruby/1.8/timeout.rb:48:in `timeout' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:21:in > `run' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/behaviour.rb:70:in > `run' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/behaviour.rb:67:in > `each' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/behaviour.rb:67:in > `run' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:45:in > `run_behaviours' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:44:in > `each' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:44:in > `run_behaviours' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:27:in > `run' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/command_line.rb:17:in > `run' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/bin/spec:3: > /opt/local/bin/spec:16:in `load' > /opt/local/bin/spec:16: > > 2) > ActiveRecord::StatementInvalid in 'User being authenticated should require > login' > Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM > users > > > 3) > ActiveRecord::StatementInvalid in 'User being authenticated should require > password' > Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM > users > > > 4) > ActiveRecord::StatementInvalid in 'User being authenticated should require > password confirmation' > Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM > users > > > 5) > ActiveRecord::StatementInvalid in 'User being authenticated should require > email' > Mysql::Error: Table 'mrblog_test.users' doesn't exist: SHOW FIELDS FROM > users > > > 6) > NoMethodError in 'User being authenticated should reset password' > undefined method `[]' for nil:NilClass > /opt/local/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/fixtures.rb:498:in > `users' > ./test/spec/models/user_spec.rb:32: > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:73:in > `instance_eval' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:73:in > `run_example' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:23:in > `run' > /opt/local/lib/ruby/1.8/timeout.rb:48:in `timeout' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/example.rb:21:in > `run' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/behaviour.rb:70:in > `run' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/behaviour.rb:67:in > `each' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/dsl/behaviour.rb:67:in > `run' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:45:in > `run_behaviours' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:44:in > `each' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:44:in > `run_behaviours' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/behaviour_runner.rb:27:in > `run' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/lib/spec/runner/command_line.rb:17:in > `run' > /opt/local/lib/ruby/gems/1.8/gems/rspec-0.9.3/bin/spec:3: > /opt/local/bin/spec:16:in `load' > /opt/local/bin/spec:16: > > 7) > NoMethodError in 'User being authenticated should not rehash password' > undefined method `[]' for nil:NilClass > > > 8) > NoMethodError in 'User being authenticated should authenticate user' > undefined method `[]' for nil:NilClass > > Finished in 0.14894 seconds > > 8 examples, 8 failures > > > On May 9, 2007, at 3:26 AM, Brian Takita wrote: > > Grag, > > Thanks for trying the Rspec on Merb plugin out. > > Did you get any exceptions related to loading the fixtures? > Are you using the fixtures method in the Behaviour block? > > Maybe it would be easier post your spec at: > http://pastie.caboo.se/ > and reply with the link. > > Thanks, > Brian > > On 5/8/07, Gregory O'Connor < goconnor at plumtv.com> wrote: > > > > Hey Brian and Ezra, > > thank you both for this very interesting code. > > it's exciting to easily upload a couple of 1.5G files at the same time. > > > > rake specs > > fails for me as the fixtures/users.yml is not loaded (after editing > > the test/spec/spec_helper.rb for my database). > > > > also looking at why the progress bar doesn't work for me out of the > > box. of course the file upload ability is awesome. > > > > regards, > > gregory o'connor > > > On 5/4/07, Ezra Zygmuntowicz wrote: > > > > > > > > > > > > On May 4, 2007, at 3:29 PM, Brian Takita wrote: > > > > > > > > > A couple days ago I submitted a patch, that was committed by Ezra, > > > > > > > to the MrBlog project for the Rspec on Merb plugin. > > > > > So far, it only works with ActiveRecord including fixtures. > > > > > Has any played with it? If so, did you get it to work? > > > > > > > > > > I'm going to be submitting a patch for Controller specs soon. It > > > > > will be very bare bones, given my current lack of understanding of > > > > > Merb controller development. > > > > > View and Helper specs will follow. > > > > > > > > > > I saw the question on IRC, but should ROM be folded into Merb > > > > > itself, or act as a plugin? There are advantages and disadvantages > > > > > > > to both. > > > > > > > > > > A pull to integrate classes into Merb is that these classes can be > > > > > reused by Test::Unit tests and Rspec. > > > > > A pull to keep classes in a plugin is It can change whenever Merb > > > > > or Rspec changes. Since both Merb and Rspec are rapidly evolving, > > > > > there may be a need for the plugin for a while. > > > > > Since Test::Unit is fairly static, there may not be a need to make > > > > > > > the Test::Unit library a plugin. > > > > > > > > > > One flaw with Rails, that I hope does not get repeated in Merb, is > > > > > the tight coupling with Test;:Unit (same with tight coupling with > > > > > Rspec). Of course Rspec did not exist when Rails was first > > > > > developed, so this should not be much of a problem as long as we > > > > > are vigilant. :) > > > > > > > > > > Brian > > > > > > > > > > > > > Hey Brian- > > > > > > > > I was able to get the user specs running in mrblog trunk. I > > > > commited > > > > a rake task to run them as 'rake specs'. The presence of a spec > > > > harness makes the need for proper environments in merb urgent. I > > > will > > > > hack up environments with different db settings this weekend so it > > > > will make testing and deving easier. > > > > > > > > I think that we should keep it as a plugin for a little > > > while. I > > > > don't want to go down the tightly coupled road in merb's testing > > > > capabilities. I think there are some core helper classes I need to > > > > write that could go in the framework and be used by test/unit or > > > > rspec or whatver. Like a helper for making requests thru the > > > > dispacther and controllers to test output without booting a > > > > webserver, and some other stuff that will help with testing. > > > > > > > > I'd like to see the test helpers that are merb specific > > > made into > > > > libraries within merb that you can use from test/unit, test/spec or > > > > rspec. > > > > > > > > Thanks for getting this started Brian, it's a nice > > > plugin. If you > > > > have any questions about merb internals please feel free to ask > > > and I > > > > will help you grok it quickly. > > > > > > > > > Great. Thanks Ezra. > > > > > > I submitted a patch for a frist stab at controller specs. > > > http://merb.devjavu.com/projects/merb/ticket/45 > > > > > > Here are some things of consideration: > > > > > > - response.should redirect_to and response.should > > > render_template and > > > not implemented yet. > > > - The controller Description class has a controller_class > > > accessor. If > > > the first argument of describe is set to the controller class, > > > the examples > > > will know that the requests are for the controller. > > > - I couldn't figure out how to construct the correct uri given the > > > controller and the action. > > > > > > > > > Cheers- > > > > -- Ezra Zygmuntowicz > > > > -- Lead Rails Evangelist > > > > -- ez at engineyard.com > > > > -- Engine Yard, Serious Rails Hosting > > > > -- (866) 518-YARD (9273) > > > > > > > > > > > > > > > > > > _______________________________________________ > > 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/20070509/028689ea/attachment.html From boss at topfunky.com Sat May 12 18:49:57 2007 From: boss at topfunky.com (Geoffrey Grosenbach) Date: Sat, 12 May 2007 15:49:57 -0700 Subject: HAML? Message-ID: <15754f7e0705121549l2575629fu791a7c0b3de45276@mail.gmail.com> Is anyone developing with HAML templates in Merb? I had to do a few hacks but got it generally working (Merb trunk). I did have to do odd things like print @_layout_content straight out instead of calling catch_content(:layout). And, templates seem to be cached even if I set :cache_templates to false in merb.yml. I hope to be at the MerbHack night at RailsConf and would love to hack on this part of Merb with anyone else who is interested. -- Geoffrey Grosenbach boss at topfunky.com ........................ Blog | http://nubyonrails.com Podcast | http://podcast.rubyonrails.com Screencast | http://peepcode.com From mike at harmonypark.net Mon May 14 13:16:02 2007 From: mike at harmonypark.net (Mike Evans) Date: Mon, 14 May 2007 18:16:02 +0100 Subject: Help a newb with 0.3.1 Message-ID: <12B9B176-8D53-4EFB-B1B9-7443F78565B0@harmonypark.net> Hi, first off thanks Ezra for Merb - it's certainly interesting and I'm keen to have a play. However, I'm having difficulties in getting started. I've followed the docs for setting up mrblog and everything seems to be installed correctly, and merb appears to start fine: $ merb you must install the markaby gem to use .mab templates you must install the haml gem to use .haml templates ActiveRecord session mixed in Rails session compatibilty on. Compiling routes.. merb init called Merb started with these options: --- :dist_root: /path/to/merb/mrblog/dist :allow_reloading: true :environment: development :merb_root: /path/to/merb/mrblog :cache_templates: true :use_mutex: true :config: dist/conf/mup.conf :host: 127.0.0.1 :show_error: true :port: "4000" :sql_session: true However any request to 127.0.0.1:4000 returns: Mon May 14 17:55:30 BST 2007: ERROR: undefined method `each' for # with nothing in the browser or in the log. Similarly, using a newly generated test app, I get: Mon May 14 17:56:27 BST 2007: ERROR: undefined method `each' for nil:NilClass I've tried both installing via gem and from trunk. Without a trace and a line number it's hard to know where to start. Am I missing something really obvious here? It's been known to happen before... Any help much appreciated! Cheers, Mike From ez at engineyard.com Mon May 14 14:30:12 2007 From: ez at engineyard.com (Ezra Zygmuntowicz) Date: Mon, 14 May 2007 11:30:12 -0700 Subject: Help a newb with 0.3.1 In-Reply-To: <12B9B176-8D53-4EFB-B1B9-7443F78565B0@harmonypark.net> References: <12B9B176-8D53-4EFB-B1B9-7443F78565B0@harmonypark.net> Message-ID: <2042BF1F-546F-4C39-BD22-20122DC4E98C@engineyard.com> Mike- What version of mongrel do you have installed? This error looks like you have an outdated mongrel. Install mongrel 1.0.1 an d this will go away. Cheers- -Ezra On May 14, 2007, at 10:16 AM, Mike Evans wrote: > Hi, first off thanks Ezra for Merb - it's certainly interesting and > I'm keen to have a play. However, I'm having difficulties in getting > started. I've followed the docs for setting up mrblog and everything > seems to be installed correctly, and merb appears to start fine: > > $ merb > you must install the markaby gem to use .mab templates > you must install the haml gem to use .haml templates > ActiveRecord session mixed in > Rails session compatibilty on. > Compiling routes.. > merb init called > Merb started with these options: > --- > :dist_root: /path/to/merb/mrblog/dist > :allow_reloading: true > :environment: development > :merb_root: /path/to/merb/mrblog > :cache_templates: true > :use_mutex: true > :config: dist/conf/mup.conf > :host: 127.0.0.1 > :show_error: true > :port: "4000" > :sql_session: true > > > However any request to 127.0.0.1:4000 returns: > > Mon May 14 17:55:30 BST 2007: ERROR: undefined method `each' for > # > > with nothing in the browser or in the log. Similarly, using a newly > generated test app, I get: > > Mon May 14 17:56:27 BST 2007: ERROR: undefined method `each' for > nil:NilClass > > > I've tried both installing via gem and from trunk. Without a trace > and a line number it's hard to know where to start. Am I missing > something really obvious here? It's been known to happen before... > Any help much appreciated! > > Cheers, > Mike > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From mike at harmonypark.net Mon May 14 15:20:35 2007 From: mike at harmonypark.net (Mike Evans) Date: Mon, 14 May 2007 20:20:35 +0100 Subject: Help a newb with 0.3.1 In-Reply-To: <2042BF1F-546F-4C39-BD22-20122DC4E98C@engineyard.com> References: <12B9B176-8D53-4EFB-B1B9-7443F78565B0@harmonypark.net> <2042BF1F-546F-4C39-BD22-20122DC4E98C@engineyard.com> Message-ID: <4C20C241-DD65-484E-AE09-4011EFF95820@harmonypark.net> Thanks Ezra, that's it - with the latest Mongrel it's all good. Onwards and upwards! Mike On 14 May 2007, at 19:30, Ezra Zygmuntowicz wrote: > Mike- > > What version of mongrel do you have installed? This error looks > like you have an outdated mongrel. Install mongrel 1.0.1 an d this > will go away. > > Cheers- > > -Ezra > > > On May 14, 2007, at 10:16 AM, Mike Evans wrote: > >> Hi, first off thanks Ezra for Merb - it's certainly interesting and >> I'm keen to have a play. However, I'm having difficulties in getting >> started. I've followed the docs for setting up mrblog and everything >> seems to be installed correctly, and merb appears to start fine: >> >> $ merb >> you must install the markaby gem to use .mab templates >> you must install the haml gem to use .haml templates >> ActiveRecord session mixed in >> Rails session compatibilty on. >> Compiling routes.. >> merb init called >> Merb started with these options: >> --- >> :dist_root: /path/to/merb/mrblog/dist >> :allow_reloading: true >> :environment: development >> :merb_root: /path/to/merb/mrblog >> :cache_templates: true >> :use_mutex: true >> :config: dist/conf/mup.conf >> :host: 127.0.0.1 >> :show_error: true >> :port: "4000" >> :sql_session: true >> >> >> However any request to 127.0.0.1:4000 returns: >> >> Mon May 14 17:55:30 BST 2007: ERROR: undefined method `each' for >> # >> >> with nothing in the browser or in the log. Similarly, using a newly >> generated test app, I get: >> >> Mon May 14 17:56:27 BST 2007: ERROR: undefined method `each' for >> nil:NilClass >> >> >> I've tried both installing via gem and from trunk. Without a trace >> and a line number it's hard to know where to start. Am I missing >> something really obvious here? It's been known to happen before... >> Any help much appreciated! >> >> Cheers, >> Mike >> _______________________________________________ >> Merb-devel mailing list >> Merb-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/merb-devel > > -- Ezra Zygmuntowicz-- Lead Rails Evangelist > -- ez at engineyard.com > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273) > > From mike at harmonypark.net Mon May 14 19:08:31 2007 From: mike at harmonypark.net (Mike Evans) Date: Tue, 15 May 2007 00:08:31 +0100 Subject: Upload Progress always 0% until it's 100% In-Reply-To: <2042BF1F-546F-4C39-BD22-20122DC4E98C@engineyard.com> References: <12B9B176-8D53-4EFB-B1B9-7443F78565B0@harmonypark.net> <2042BF1F-546F-4C39-BD22-20122DC4E98C@engineyard.com> Message-ID: Sorry to bug everyone with newbie questions today but hopefully this one is more substantial than the last. I'm trying to get a handle on the upload progress code as found in the mrblog example. Firstly, I found that the progress bar isn't displayed given the current code in trunk, as its CSS and the link to mup.js in views/files/start.herb are inside <% throw_content :header %>, but the files/start action is rendered without a layout. Removing either the throw_content or the :layout => :none in the controller solves this. However, for me the bar stays on 0% until the upload is complete, at which point it jumps to 100%. When uploading a 350Mb file locally, it appears that although the periodic polling occurs, the upload is considered to be finished almost immediately it begins: 1179176946: Added 1179176946: Marking 1179176946: Marking 1179176946: Marking 1179176946: Added 1179176946: Finished {"action"=>"progress", "controller"=>"files", "upload_id"=>"1179176946"} 1179176946: Added 1179176946: Finished {"action"=>"progress", "controller"=>"files", "upload_id"=>"1179176946"} 1179176946: Added 1179176946: Finished {"action"=>"progress", "controller"=>"files", "upload_id"=>"1179176946"} ... In reality, the upload takes a couple of minutes. (Even copying the file locally takes more than a minute.) Can anyone point me in the right direction? I'm not sure where the Mongrel::Upload class is defined - I can see that the debug output above is coming from merb-0.3.1/lib/merb/merb_upload_progress.rb as required in merb_upload_handler.rb, but I don't understand how request_progress is called to update the :size and :received counters, nor why the upload is treated as over almost before it starts. I'm testing on ruby 1.8.6 on Mac OS X 10.4.9 with Mongrel 1.0.1. Thanks for any help, Mike On 14 May 2007, at 19:30, Ezra Zygmuntowicz wrote: > Mike- > > What version of mongrel do you have installed? This error looks > like you have an outdated mongrel. Install mongrel 1.0.1 an d this > will go away. > > Cheers- > > -Ezra > > > On May 14, 2007, at 10:16 AM, Mike Evans wrote: > >> Hi, first off thanks Ezra for Merb - it's certainly interesting and >> I'm keen to have a play. However, I'm having difficulties in getting >> started. I've followed the docs for setting up mrblog and everything >> seems to be installed correctly, and merb appears to start fine: >> >> $ merb >> you must install the markaby gem to use .mab templates >> you must install the haml gem to use .haml templates >> ActiveRecord session mixed in >> Rails session compatibilty on. >> Compiling routes.. >> merb init called >> Merb started with these options: >> --- >> :dist_root: /path/to/merb/mrblog/dist >> :allow_reloading: true >> :environment: development >> :merb_root: /path/to/merb/mrblog >> :cache_templates: true >> :use_mutex: true >> :config: dist/conf/mup.conf >> :host: 127.0.0.1 >> :show_error: true >> :port: "4000" >> :sql_session: true >> >> >> However any request to 127.0.0.1:4000 returns: >> >> Mon May 14 17:55:30 BST 2007: ERROR: undefined method `each' for >> # >> >> with nothing in the browser or in the log. Similarly, using a newly >> generated test app, I get: >> >> Mon May 14 17:56:27 BST 2007: ERROR: undefined method `each' for >> nil:NilClass >> >> >> I've tried both installing via gem and from trunk. Without a trace >> and a line number it's hard to know where to start. Am I missing >> something really obvious here? It's been known to happen before... >> Any help much appreciated! >> >> Cheers, >> Mike >> _______________________________________________ >> Merb-devel mailing list >> Merb-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/merb-devel > > -- Ezra Zygmuntowicz-- Lead Rails Evangelist > -- ez at engineyard.com > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273) > > From rogelio.samour at gmail.com Mon May 14 22:21:01 2007 From: rogelio.samour at gmail.com (Rogelio J. Samour) Date: Mon, 14 May 2007 21:21:01 -0500 Subject: Upload Progress always 0% until it's 100% In-Reply-To: References: <12B9B176-8D53-4EFB-B1B9-7443F78565B0@harmonypark.net> <2042BF1F-546F-4C39-BD22-20122DC4E98C@engineyard.com> Message-ID: We're currently investigating this issue right now. If you're on trunk this is an unresolved bug. If you want a progress indicator you should checkout rev 222. cheerio, Rogelio On 5/14/07, Mike Evans wrote: > > Sorry to bug everyone with newbie questions today but hopefully this > one is more substantial than the last. I'm trying to get a handle on > the upload progress code as found in the mrblog example. Firstly, I > found that the progress bar isn't displayed given the current code in > trunk, as its CSS and the link to mup.js in views/files/start.herb > are inside <% throw_content :header %>, but the files/start action is > rendered without a layout. Removing either the throw_content or > the :layout => :none in the controller solves this. > > However, for me the bar stays on 0% until the upload is complete, at > which point it jumps to 100%. When uploading a 350Mb file locally, it > appears that although the periodic polling occurs, the upload is > considered to be finished almost immediately it begins: > > 1179176946: Added > 1179176946: Marking > 1179176946: Marking > 1179176946: Marking > 1179176946: Added > 1179176946: Finished > {"action"=>"progress", "controller"=>"files", "upload_id"=>"1179176946"} > 1179176946: Added > 1179176946: Finished > {"action"=>"progress", "controller"=>"files", "upload_id"=>"1179176946"} > 1179176946: Added > 1179176946: Finished > {"action"=>"progress", "controller"=>"files", "upload_id"=>"1179176946"} > ... > > In reality, the upload takes a couple of minutes. (Even copying the > file locally takes more than a minute.) > > Can anyone point me in the right direction? I'm not sure where the > Mongrel::Upload class is defined - I can see that the debug output > above is coming from merb-0.3.1/lib/merb/merb_upload_progress.rb as > required in merb_upload_handler.rb, but I don't understand how > request_progress is called to update the :size and :received > counters, nor why the upload is treated as over almost before it starts. > > I'm testing on ruby 1.8.6 on Mac OS X 10.4.9 with Mongrel 1.0.1. > > Thanks for any help, > Mike > > > On 14 May 2007, at 19:30, Ezra Zygmuntowicz wrote: > > > Mike- > > > > What version of mongrel do you have installed? This error looks > > like you have an outdated mongrel. Install mongrel 1.0.1 an d this > > will go away. > > > > Cheers- > > > > -Ezra > > > > > > On May 14, 2007, at 10:16 AM, Mike Evans wrote: > > > >> Hi, first off thanks Ezra for Merb - it's certainly interesting and > >> I'm keen to have a play. However, I'm having difficulties in getting > >> started. I've followed the docs for setting up mrblog and everything > >> seems to be installed correctly, and merb appears to start fine: > >> > >> $ merb > >> you must install the markaby gem to use .mab templates > >> you must install the haml gem to use .haml templates > >> ActiveRecord session mixed in > >> Rails session compatibilty on. > >> Compiling routes.. > >> merb init called > >> Merb started with these options: > >> --- > >> :dist_root: /path/to/merb/mrblog/dist > >> :allow_reloading: true > >> :environment: development > >> :merb_root: /path/to/merb/mrblog > >> :cache_templates: true > >> :use_mutex: true > >> :config: dist/conf/mup.conf > >> :host: 127.0.0.1 > >> :show_error: true > >> :port: "4000" > >> :sql_session: true > >> > >> > >> However any request to 127.0.0.1:4000 returns: > >> > >> Mon May 14 17:55:30 BST 2007: ERROR: undefined method `each' for > >> # > >> > >> with nothing in the browser or in the log. Similarly, using a newly > >> generated test app, I get: > >> > >> Mon May 14 17:56:27 BST 2007: ERROR: undefined method `each' for > >> nil:NilClass > >> > >> > >> I've tried both installing via gem and from trunk. Without a trace > >> and a line number it's hard to know where to start. Am I missing > >> something really obvious here? It's been known to happen before... > >> Any help much appreciated! > >> > >> Cheers, > >> Mike > >> _______________________________________________ > >> Merb-devel mailing list > >> Merb-devel at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/merb-devel > > > > -- Ezra Zygmuntowicz-- Lead Rails Evangelist > > -- ez at engineyard.com > > -- Engine Yard, Serious Rails Hosting > > -- (866) 518-YARD (9273) > > > > > > _______________________________________________ > 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/20070514/f925db16/attachment.html From mike at harmonypark.net Tue May 15 10:03:40 2007 From: mike at harmonypark.net (Mike Evans) Date: Tue, 15 May 2007 15:03:40 +0100 Subject: Upload Progress always 0% until it's 100% In-Reply-To: References: <12B9B176-8D53-4EFB-B1B9-7443F78565B0@harmonypark.net> <2042BF1F-546F-4C39-BD22-20122DC4E98C@engineyard.com> Message-ID: Nice one, thanks Rogelio - the progress bar in rev 222 works as expected. Cheers, Mike On 15 May 2007, at 03:21, Rogelio J. Samour wrote: > We're currently investigating this issue right now. If you're on > trunk this is an unresolved bug. > > If you want a progress indicator you should checkout rev 222. > > cheerio, > > Rogelio > > On 5/14/07, Mike Evans wrote: > Sorry to bug everyone with newbie questions today but hopefully this > one is more substantial than the last. I'm trying to get a handle on > the upload progress code as found in the mrblog example. Firstly, I > found that the progress bar isn't displayed given the current code in > trunk, as its CSS and the link to mup.js in views/files/start.herb > are inside <% throw_content :header %>, but the files/start action is > rendered without a layout. Removing either the throw_content or > the :layout => :none in the controller solves this. > > However, for me the bar stays on 0% until the upload is complete, at > which point it jumps to 100%. When uploading a 350Mb file locally, it > appears that although the periodic polling occurs, the upload is > considered to be finished almost immediately it begins: > > 1179176946: Added > 1179176946: Marking > 1179176946: Marking > 1179176946: Marking > 1179176946: Added > 1179176946: Finished > {"action"=>"progress", "controller"=>"files", > "upload_id"=>"1179176946"} > 1179176946: Added > 1179176946: Finished > {"action"=>"progress", "controller"=>"files", > "upload_id"=>"1179176946"} > 1179176946: Added > 1179176946: Finished > {"action"=>"progress", "controller"=>"files", > "upload_id"=>"1179176946"} > ... > > In reality, the upload takes a couple of minutes. (Even copying the > file locally takes more than a minute.) > > Can anyone point me in the right direction? I'm not sure where the > Mongrel::Upload class is defined - I can see that the debug output > above is coming from merb-0.3.1 /lib/merb/merb_upload_progress.rb as > required in merb_upload_handler.rb, but I don't understand how > request_progress is called to update the :size and :received > counters, nor why the upload is treated as over almost before it > starts. > > I'm testing on ruby 1.8.6 on Mac OS X 10.4.9 with Mongrel 1.0.1. > > Thanks for any help, > Mike > > > On 14 May 2007, at 19:30, Ezra Zygmuntowicz wrote: > > > Mike- > > > > What version of mongrel do you have installed? This error > looks > > like you have an outdated mongrel. Install mongrel 1.0.1 an d this > > will go away. > > > > Cheers- > > > > -Ezra > > > > > > On May 14, 2007, at 10:16 AM, Mike Evans wrote: > > > >> Hi, first off thanks Ezra for Merb - it's certainly interesting and > >> I'm keen to have a play. However, I'm having difficulties in > getting > >> started. I've followed the docs for setting up mrblog and > everything > >> seems to be installed correctly, and merb appears to start fine: > >> > >> $ merb > >> you must install the markaby gem to use .mab templates > >> you must install the haml gem to use .haml templates > >> ActiveRecord session mixed in > >> Rails session compatibilty on. > >> Compiling routes.. > >> merb init called > >> Merb started with these options: > >> --- > >> :dist_root: /path/to/merb/mrblog/dist > >> :allow_reloading: true > >> :environment: development > >> :merb_root: /path/to/merb/mrblog > >> :cache_templates: true > >> :use_mutex: true > >> :config: dist/conf/mup.conf > >> :host: 127.0.0.1 > >> :show_error: true > >> :port: "4000" > >> :sql_session: true > >> > >> > >> However any request to 127.0.0.1:4000 returns: > >> > >> Mon May 14 17:55:30 BST 2007: ERROR: undefined method `each' for > >> # > >> > >> with nothing in the browser or in the log. Similarly, using a newly > >> generated test app, I get: > >> > >> Mon May 14 17:56:27 BST 2007: ERROR: undefined method `each' for > >> nil:NilClass > >> > >> > >> I've tried both installing via gem and from trunk. Without a trace > >> and a line number it's hard to know where to start. Am I missing > >> something really obvious here? It's been known to happen before... > >> Any help much appreciated! > >> > >> Cheers, > >> Mike > >> _______________________________________________ > >> Merb-devel mailing list > >> Merb-devel at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/merb-devel > > > > -- Ezra Zygmuntowicz-- Lead Rails Evangelist > > -- ez at engineyard.com > > -- Engine Yard, Serious Rails Hosting > > -- (866) 518-YARD (9273) > > > > > > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel > > _______________________________________________ > 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/20070515/677e0e6a/attachment-0001.html From goconnor at plumtv.com Tue May 15 15:24:31 2007 From: goconnor at plumtv.com (Gregory O'Connor) Date: Tue, 15 May 2007 15:24:31 -0400 Subject: Upload Progress always 0% until it's 100% In-Reply-To: References: <12B9B176-8D53-4EFB-B1B9-7443F78565B0@harmonypark.net> <2042BF1F-546F-4C39-BD22-20122DC4E98C@engineyard.com> Message-ID: Hi Mike, i've just tried mrblog revision222 and wonder if you had to modify anything other than dist/conf/merb_init.rb and dist/conf/merb.yml to get the upload progress to work? thanks, greg On May 15, 2007, at 10:03 AM, Mike Evans wrote: > Nice one, thanks Rogelio - the progress bar in rev 222 works as > expected. > > Cheers, > Mike > > On 15 May 2007, at 03:21, Rogelio J. Samour wrote: > >> We're currently investigating this issue right now. If you're on >> trunk this is an unresolved bug. >> >> If you want a progress indicator you should checkout rev 222. >> >> cheerio, >> >> Rogelio >> >> On 5/14/07, Mike Evans wrote: >> Sorry to bug everyone with newbie questions today but hopefully this >> one is more substantial than the last. I'm trying to get a handle on >> the upload progress code as found in the mrblog example. Firstly, I >> found that the progress bar isn't displayed given the current code in >> trunk, as its CSS and the link to mup.js in views/files/start.herb >> are inside <% throw_content :header %>, but the files/start action is >> rendered without a layout. Removing either the throw_content or >> the :layout => :none in the controller solves this. >> >> However, for me the bar stays on 0% until the upload is complete, at >> which point it jumps to 100%. When uploading a 350Mb file locally, it >> appears that although the periodic polling occurs, the upload is >> considered to be finished almost immediately it begins: >> >> 1179176946: Added >> 1179176946: Marking >> 1179176946: Marking >> 1179176946: Marking >> 1179176946: Added >> 1179176946: Finished >> {"action"=>"progress", "controller"=>"files", >> "upload_id"=>"1179176946"} >> 1179176946: Added >> 1179176946: Finished >> {"action"=>"progress", "controller"=>"files", >> "upload_id"=>"1179176946"} >> 1179176946: Added >> 1179176946: Finished >> {"action"=>"progress", "controller"=>"files", >> "upload_id"=>"1179176946"} >> ... >> >> In reality, the upload takes a couple of minutes. (Even copying the >> file locally takes more than a minute.) >> >> Can anyone point me in the right direction? I'm not sure where the >> Mongrel::Upload class is defined - I can see that the debug output >> above is coming from merb-0.3.1 /lib/merb/merb_upload_progress.rb as >> required in merb_upload_handler.rb, but I don't understand how >> request_progress is called to update the :size and :received >> counters, nor why the upload is treated as over almost before it >> starts. >> >> I'm testing on ruby 1.8.6 on Mac OS X 10.4.9 with Mongrel 1.0.1. >> >> Thanks for any help, >> Mike >> >> >> On 14 May 2007, at 19:30, Ezra Zygmuntowicz wrote: >> >> > Mike- >> > >> > What version of mongrel do you have installed? This error >> looks >> > like you have an outdated mongrel. Install mongrel 1.0.1 an d this >> > will go away. >> > >> > Cheers- >> > >> > -Ezra >> > >> > >> > On May 14, 2007, at 10:16 AM, Mike Evans wrote: >> > >> >> Hi, first off thanks Ezra for Merb - it's certainly interesting >> and >> >> I'm keen to have a play. However, I'm having difficulties in >> getting >> >> started. I've followed the docs for setting up mrblog and >> everything >> >> seems to be installed correctly, and merb appears to start fine: >> >> >> >> $ merb >> >> you must install the markaby gem to use .mab templates >> >> you must install the haml gem to use .haml templates >> >> ActiveRecord session mixed in >> >> Rails session compatibilty on. >> >> Compiling routes.. >> >> merb init called >> >> Merb started with these options: >> >> --- >> >> :dist_root: /path/to/merb/mrblog/dist >> >> :allow_reloading: true >> >> :environment: development >> >> :merb_root: /path/to/merb/mrblog >> >> :cache_templates: true >> >> :use_mutex: true >> >> :config: dist/conf/mup.conf >> >> :host: 127.0.0.1 >> >> :show_error: true >> >> :port: "4000" >> >> :sql_session: true >> >> >> >> >> >> However any request to 127.0.0.1:4000 returns: >> >> >> >> Mon May 14 17:55:30 BST 2007: ERROR: undefined method `each' for >> >> # >> >> >> >> with nothing in the browser or in the log. Similarly, using a >> newly >> >> generated test app, I get: >> >> >> >> Mon May 14 17:56:27 BST 2007: ERROR: undefined method `each' for >> >> nil:NilClass >> >> >> >> >> >> I've tried both installing via gem and from trunk. Without a trace >> >> and a line number it's hard to know where to start. Am I missing >> >> something really obvious here? It's been known to happen before... >> >> Any help much appreciated! >> >> >> >> Cheers, >> >> Mike >> >> _______________________________________________ >> >> Merb-devel mailing list >> >> Merb-devel at rubyforge.org >> >> http://rubyforge.org/mailman/listinfo/merb-devel >> > >> > -- Ezra Zygmuntowicz-- Lead Rails Evangelist >> > -- ez at engineyard.com >> > -- Engine Yard, Serious Rails Hosting >> > -- (866) 518-YARD (9273) >> > >> > >> >> _______________________________________________ >> Merb-devel mailing list >> Merb-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/merb-devel >> >> _______________________________________________ >> Merb-devel mailing list >> Merb-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/merb-devel > > _______________________________________________ > 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/20070515/92b0ee08/attachment.html From mike at harmonypark.net Tue May 15 17:47:11 2007 From: mike at harmonypark.net (Mike Evans) Date: Tue, 15 May 2007 22:47:11 +0100 Subject: Upload Progress always 0% until it's 100% In-Reply-To: References: <12B9B176-8D53-4EFB-B1B9-7443F78565B0@harmonypark.net> <2042BF1F-546F-4C39-BD22-20122DC4E98C@engineyard.com> Message-ID: Hi Greg, yes, because the start action in the files controller has no layout, the mup.js javascript is not being included. Without this, the progress bar isn't displayed at all, even at 0%. So you have to either remove :layout => :none from the start action in controllers/ files.rb, or remove the <% throw_content :header %><% end %> wrapper around the CSS and javascript include in views/files/start.herb. Cheers, Mike On 15 May 2007, at 20:24, Gregory O'Connor wrote: > Hi Mike, > i've just tried mrblog revision222 and wonder if you had to modify > anything other than dist/conf/merb_init.rb and dist/conf/merb.yml > to get the upload progress to work? > thanks, > greg > > On May 15, 2007, at 10:03 AM, Mike Evans wrote: > >> Nice one, thanks Rogelio - the progress bar in rev 222 works as >> expected. >> >> Cheers, >> Mike >> >> On 15 May 2007, at 03:21, Rogelio J. Samour wrote: >> >>> We're currently investigating this issue right now. If you're on >>> trunk this is an unresolved bug. >>> >>> If you want a progress indicator you should checkout rev 222. >>> >>> cheerio, >>> >>> Rogelio >>> >>> On 5/14/07, Mike Evans wrote: >>> Sorry to bug everyone with newbie questions today but hopefully this >>> one is more substantial than the last. I'm trying to get a handle on >>> the upload progress code as found in the mrblog example. Firstly, I >>> found that the progress bar isn't displayed given the current >>> code in >>> trunk, as its CSS and the link to mup.js in views/files/start.herb >>> are inside <% throw_content :header %>, but the files/start >>> action is >>> rendered without a layout. Removing either the throw_content or >>> the :layout => :none in the controller solves this. >>> >>> However, for me the bar stays on 0% until the upload is complete, at >>> which point it jumps to 100%. When uploading a 350Mb file >>> locally, it >>> appears that although the periodic polling occurs, the upload is >>> considered to be finished almost immediately it begins: >>> >>> 1179176946: Added >>> 1179176946: Marking >>> 1179176946: Marking >>> 1179176946: Marking >>> 1179176946: Added >>> 1179176946: Finished >>> {"action"=>"progress", "controller"=>"files", >>> "upload_id"=>"1179176946"} >>> 1179176946: Added >>> 1179176946: Finished >>> {"action"=>"progress", "controller"=>"files", >>> "upload_id"=>"1179176946"} >>> 1179176946: Added >>> 1179176946: Finished >>> {"action"=>"progress", "controller"=>"files", >>> "upload_id"=>"1179176946"} >>> ... >>> >>> In reality, the upload takes a couple of minutes. (Even copying the >>> file locally takes more than a minute.) >>> >>> Can anyone point me in the right direction? I'm not sure where the >>> Mongrel::Upload class is defined - I can see that the debug output >>> above is coming from merb-0.3.1 /lib/merb/merb_upload_progress.rb as >>> required in merb_upload_handler.rb, but I don't understand how >>> request_progress is called to update the :size and :received >>> counters, nor why the upload is treated as over almost before it >>> starts. >>> >>> I'm testing on ruby 1.8.6 on Mac OS X 10.4.9 with Mongrel 1.0.1. >>> >>> Thanks for any help, >>> Mike >>> >>> >>> On 14 May 2007, at 19:30, Ezra Zygmuntowicz wrote: >>> >>> > Mike- >>> > >>> > What version of mongrel do you have installed? This error >>> looks >>> > like you have an outdated mongrel. Install mongrel 1.0.1 an d this >>> > will go away. >>> > >>> > Cheers- >>> > >>> > -Ezra >>> > >>> > >>> > On May 14, 2007, at 10:16 AM, Mike Evans wrote: >>> > >>> >> Hi, first off thanks Ezra for Merb - it's certainly >>> interesting and >>> >> I'm keen to have a play. However, I'm having difficulties in >>> getting >>> >> started. I've followed the docs for setting up mrblog and >>> everything >>> >> seems to be installed correctly, and merb appears to start fine: >>> >> >>> >> $ merb >>> >> you must install the markaby gem to use .mab templates >>> >> you must install the haml gem to use .haml templates >>> >> ActiveRecord session mixed in >>> >> Rails session compatibilty on. >>> >> Compiling routes.. >>> >> merb init called >>> >> Merb started with these options: >>> >> --- >>> >> :dist_root: /path/to/merb/mrblog/dist >>> >> :allow_reloading: true >>> >> :environment: development >>> >> :merb_root: /path/to/merb/mrblog >>> >> :cache_templates: true >>> >> :use_mutex: true >>> >> :config: dist/conf/mup.conf >>> >> :host: 127.0.0.1 >>> >> :show_error: true >>> >> :port: "4000" >>> >> :sql_session: true >>> >> >>> >> >>> >> However any request to 127.0.0.1:4000 returns: >>> >> >>> >> Mon May 14 17:55:30 BST 2007: ERROR: undefined method `each' for >>> >> # >>> >> >>> >> with nothing in the browser or in the log. Similarly, using a >>> newly >>> >> generated test app, I get: >>> >> >>> >> Mon May 14 17:56:27 BST 2007: ERROR: undefined method `each' for >>> >> nil:NilClass >>> >> >>> >> >>> >> I've tried both installing via gem and from trunk. Without a >>> trace >>> >> and a line number it's hard to know where to start. Am I missing >>> >> something really obvious here? It's been known to happen >>> before... >>> >> Any help much appreciated! >>> >> >>> >> Cheers, >>> >> Mike >>> >> _______________________________________________ >>> >> Merb-devel mailing list >>> >> Merb-devel at rubyforge.org >>> >> http://rubyforge.org/mailman/listinfo/merb-devel >>> > >>> > -- Ezra Zygmuntowicz-- Lead Rails Evangelist >>> > -- ez at engineyard.com >>> > -- Engine Yard, Serious Rails Hosting >>> > -- (866) 518-YARD (9273) >>> > >>> > >>> >>> _______________________________________________ >>> Merb-devel mailing list >>> Merb-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/merb-devel >>> >>> _______________________________________________ >>> Merb-devel mailing list >>> Merb-devel at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/merb-devel >> >> _______________________________________________ >> 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/20070515/cd47d025/attachment-0001.html From has.sox at gmail.com Mon May 21 21:00:42 2007 From: has.sox at gmail.com (Daniel N) Date: Tue, 22 May 2007 11:00:42 +1000 Subject: Just Starting Out Message-ID: <2fff50390705211800v62849d9bg1153e68ff13cdf2b@mail.gmail.com> Hi All, I've got a project that I really want to do on Merb. I've started on rails, but I'm not too far down the track. Is there some tutorial style docs available for it yet that anyone knows of? Cheers Daniel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20070522/a1c1acea/attachment.html From zackchandler at gmail.com Mon May 21 22:50:17 2007 From: zackchandler at gmail.com (Zack Chandler) Date: Mon, 21 May 2007 19:50:17 -0700 Subject: Just Starting Out In-Reply-To: <2fff50390705211800v62849d9bg1153e68ff13cdf2b@mail.gmail.com> References: <2fff50390705211800v62849d9bg1153e68ff13cdf2b@mail.gmail.com> Message-ID: <33841ac70705211950nd6e6d4er35ee282bb66cf120@mail.gmail.com> > I've got a project that I really want to do on Merb. I've started on > rails, but I'm not too far down the track. > > Is there some tutorial style docs available for it yet that anyone knows > of? Daniel, The code base is actually very readable and I highly recommend checking it out. I don't know of any tutorials but I was actually thinking of doing a Merb writeup myself sometime soon... Good luck. -- Zack Chandler http://depixelate.com From zackchandler at gmail.com Thu May 31 01:00:31 2007 From: zackchandler at gmail.com (Zack Chandler) Date: Wed, 30 May 2007 22:00:31 -0700 Subject: Sample Merb App Message-ID: <33841ac70705302200m704ad5fct2f067291f1e6c552@mail.gmail.com> I put together a sample app to help people learn Merb: http://svn.depixelate.com/applications/invoice_tracker/ I also blogged about it here: http://depixelate.com/2007/5/31/taking-merb-for-a-spin -- Zack Chandler http://depixelate.com From ez at engineyard.com Thu May 31 03:34:57 2007 From: ez at engineyard.com (Ezra Zygmuntowicz) Date: Thu, 31 May 2007 00:34:57 -0700 Subject: Sample Merb App In-Reply-To: <33841ac70705302200m704ad5fct2f067291f1e6c552@mail.gmail.com> References: <33841ac70705302200m704ad5fct2f067291f1e6c552@mail.gmail.com> Message-ID: <858A620D-4639-40E1-9797-0F93D3FE2D9B@engineyard.com> On May 30, 2007, at 10:00 PM, Zack Chandler wrote: > I put together a sample app to help people learn Merb: > http://svn.depixelate.com/applications/invoice_tracker/ > > I also blogged about it here: > http://depixelate.com/2007/5/31/taking-merb-for-a-spin > > -- > Zack Chandler > http://depixelate.com Zack- That's kick ass, thanks for doing that! Dave Goodlad did some really nice work on adding a route generator to merb. I spent some time and integrated it into merb trunk. So if you drop into merb -i console you have a show_routes method available and also a url method. The url method is also available in your controllers and views. Note that there is a slight change to the router definition in router.rb due to the routing refactor. # router.rb # note you need top use Merb::Router instead of Merb::RouteMatcher now: Merb::Router.prepare do |r| r.resources :posts do |post| post.resources :comments end r.default_routes end $ merb -i merb init called irb(main):001:0> show_routes [:edit_comment, "/posts/:post_id/comments/:id/edit"] [:new_post, "/posts/new"] [:posts, "/posts"] [:custom_new_post, "/posts/new/:action"] [:edit_post, "/posts/:id/edit"] [:comment, "/posts/:post_id/comments/:id"] [:post, "/posts/:id"] [:new_comment, "/posts/:post_id/comments/new"] [:custom_new_comment, "/posts/:post_id/comments/new/:action"] [:comments, "/posts/:post_id/comments"] => nil irb(main):002:0> url :edit_comment, :post_id => 42, :id => 24 => "/posts/42/comments/24/edit" irb(main):003:0> url :posts => "/posts" Thanks for making your sample app available, I'm sure it will help people get up to speed in merbland. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273)