From merb-devel at rubyforge.org Fri Dec 1 23:05:10 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Fri, 1 Dec 2006 20:05:10 -0800 Subject: [Merb-devel] ActiveRecord Sessions Message-ID: <6FC81E72-888F-46F6-AA27-9CFA47D7466B@engineyard.com> > I am considering using merb to process file uploads. For the most > part I'm going to keep it lean and mean. I would however like to > access my active_record_session from my Rails app. Is this built into > merb yet? > Or is it OK to just add require 'action_controller/session/ > active_record_store' to merb_init.rb and then create my own session > object (CGI::Session::ActiveRecordStore::Session.find_by_session_id > (cookies['_session_id']))? > Thanks a lot. > > Erik Hey Eric What do you need form the sessions in the rails app? You can't just require the sessions stuff fomr rails it won't work. Merb as its own DRb sessions store. But I have apps that pass off the sess_id from the rails app as a query string to the merb request. Like this: http://mymerbapp.com/whatever/foo? sess_id=lkj3lkj4k1234bk32b4ljk1b324b1324k But maybe you can explain exactly what you need to accomplish. If you can skethc out for me what you are trying to do then i may have a better suggestion. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From merb-devel at rubyforge.org Sat Dec 2 11:46:01 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Sat, 2 Dec 2006 11:46:01 -0500 Subject: [Merb-devel] ActiveRecord Sessions In-Reply-To: <6FC81E72-888F-46F6-AA27-9CFA47D7466B@engineyard.com> References: <6FC81E72-888F-46F6-AA27-9CFA47D7466B@engineyard.com> Message-ID: <48413055-5826-493E-8445-65F5D81F1E41@gmail.com> I'm running off of the same database and didn't have a problem grabbing the session_id from the cookies and then loading the session data with the ActiveRecord sessions. However, after rethinking the file upload scenario I'm going to have a dedicated Mongrel running for file uploads and probably punt on using Merb for now. The large file upload thread on the Mongrel list was seminal. You could write a book from that thread. Erik On Dec 1, 2006, at 11:05 PM, merb-devel at rubyforge.org wrote: >> I am considering using merb to process file uploads. For the most >> part I'm going to keep it lean and mean. I would however like to >> access my active_record_session from my Rails app. Is this built into >> merb yet? > >> Or is it OK to just add require 'action_controller/session/ >> active_record_store' to merb_init.rb and then create my own session >> object (CGI::Session::ActiveRecordStore::Session.find_by_session_id >> (cookies['_session_id']))? > >> Thanks a lot. >> >> Erik > > Hey Eric > > What do you need form the sessions in the rails app? You can't just > require the sessions stuff fomr rails it won't work. Merb as its own > DRb sessions store. But I have apps that pass off the sess_id from > the rails app as a query string to the merb request. Like this: > > http://mymerbapp.com/whatever/foo? > sess_id=lkj3lkj4k1234bk32b4ljk1b324b1324k > > > But maybe you can explain exactly what you need to accomplish. If > you can skethc out for me what you are trying to do then i may have a > better suggestion. > > 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 From merb-devel at rubyforge.org Sun Dec 3 02:26:50 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Sun, 3 Dec 2006 01:26:50 -0600 Subject: [Merb-devel] How To Create Database Tables With Merb 0.0.7? Message-ID: <106a0270612022326h6c22d00fy57f9cd5904f9545a@mail.gmail.com> Howdy, I just gem unpacked merb and have configured the sample_app to use an sqlite3 database. I see that the Rakefile has a task named "schema", but it points to /dist/schema/schema1.rb", which doesn't exist. I copied /dist/schema/schema1.rb to /dist/schema/schema.rb then ran "rake schema". What's the recommended way to create the database tables? Thanks, Ed From merb-devel at rubyforge.org Sun Dec 3 02:34:09 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Sun, 3 Dec 2006 01:34:09 -0600 Subject: [Merb-devel] File Upload Unix Only? Message-ID: <106a0270612022334j2c9014f2mb797cf1f040404d6@mail.gmail.com> I tried the upload feature in merb 0.0.7 using http://localhost:4000/files I get the following: Permission denied - D:/Temp/Merb.5172.0 or E:/Dev/Ruby/merb-0.0.7/examples/sample_app/dist/public/files/foobar.jpg - (Errno::EACCES) C:/Ruby/lib/ruby/1.8/fileutils.rb:501:in `rename' C:/Ruby/lib/ruby/1.8/fileutils.rb:501:in `mv' C:/Ruby/lib/ruby/1.8/fileutils.rb:1379:in `fu_each_src_dest' C:/Ruby/lib/ruby/1.8/fileutils.rb:1395:in `fu_each_src_dest0' C:/Ruby/lib/ruby/1.8/fileutils.rb:1377:in `fu_each_src_dest' C:/Ruby/lib/ruby/1.8/fileutils.rb:490:in `mv' E:/Dev/Ruby/merb-0.0.7/examples/sample_app/dist/app/controllers/files.rb:15:in `upload' Is the upload feature compatible with Unix only? Thanks, Ed From merb-devel at rubyforge.org Sun Dec 3 15:04:49 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Sun, 3 Dec 2006 12:04:49 -0800 Subject: [Merb-devel] How To Create Database Tables With Merb 0.0.7? In-Reply-To: <106a0270612022326h6c22d00fy57f9cd5904f9545a@mail.gmail.com> References: <106a0270612022326h6c22d00fy57f9cd5904f9545a@mail.gmail.com> Message-ID: On Dec 2, 2006, at 11:26 PM, merb-devel at rubyforge.org wrote: > Howdy, > > I just gem unpacked merb and have configured the sample_app to use an > sqlite3 database. I see that the Rakefile has a task named "schema", > but it points to /dist/schema/schema1.rb", which doesn't exist. I > copied /dist/schema/schema1.rb to /dist/schema/schema.rb then ran > "rake schema". What's the recommended way to create the database > tables? > > Thanks, > > Ed > Hey Ed- Once you have your database connection stuff setup then all you have to do is run: $ rake db:migrate There is also a new_migration script in the script dir of the sampel app. To make a new migration you do this: $ script/new_migration add_foo_to_bar That schema task is something else so don't sweat that one right now. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From merb-devel at rubyforge.org Sun Dec 3 15:07:59 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Sun, 3 Dec 2006 12:07:59 -0800 Subject: [Merb-devel] File Upload Unix Only? In-Reply-To: <106a0270612022334j2c9014f2mb797cf1f040404d6@mail.gmail.com> References: <106a0270612022334j2c9014f2mb797cf1f040404d6@mail.gmail.com> Message-ID: On Dec 2, 2006, at 11:34 PM, merb-devel at rubyforge.org wrote: > I tried the upload feature in merb 0.0.7 using http://localhost: > 4000/files > > I get the following: > > Permission denied - D:/Temp/Merb.5172.0 or > E:/Dev/Ruby/merb-0.0.7/examples/sample_app/dist/public/files/ > foobar.jpg > - (Errno::EACCES) C:/Ruby/lib/ruby/1.8/fileutils.rb:501:in `rename' > C:/Ruby/lib/ruby/1.8/fileutils.rb:501:in `mv' > C:/Ruby/lib/ruby/1.8/fileutils.rb:1379:in `fu_each_src_dest' > C:/Ruby/lib/ruby/1.8/fileutils.rb:1395:in `fu_each_src_dest0' > C:/Ruby/lib/ruby/1.8/fileutils.rb:1377:in `fu_each_src_dest' > C:/Ruby/lib/ruby/1.8/fileutils.rb:490:in `mv' > E:/Dev/Ruby/merb-0.0.7/examples/sample_app/dist/app/controllers/ > files.rb:15:in > `upload' > > > Is the upload feature compatible with Unix only? > > Thanks, > > Ed I think it should work fine on windows. It just uses a tmp file and FileUtils.mv to move the file where you want it to go. I have not tried on windows but it looks like you don't have permissions to write into the file upload folder. I know nothing about windows. Is there some permissions you need to set in windows? It should work. The only thing that may not work on windows is the daemonize option and the cluster option. They both use fork. It may be possible to get those to work on windows as well, once Luis figures out all the windos mongrel stuff. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From merb-devel at rubyforge.org Sun Dec 3 16:19:48 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Sun, 3 Dec 2006 15:19:48 -0600 Subject: [Merb-devel] How To Create Database Tables With Merb 0.0.7? In-Reply-To: References: <106a0270612022326h6c22d00fy57f9cd5904f9545a@mail.gmail.com> Message-ID: <106a0270612031319u25a03da0nf6c7d3b0e42ea4b4@mail.gmail.com> > > On Dec 2, 2006, at 11:26 PM, merb-devel at rubyforge.org wrote: > > > Howdy, > > > > I just gem unpacked merb and have configured the sample_app to use an > > sqlite3 database. I see that the Rakefile has a task named "schema", > > but it points to /dist/schema/schema1.rb", which doesn't exist. I > > copied /dist/schema/schema1.rb to /dist/schema/schema.rb then ran > > "rake schema". What's the recommended way to create the database > > tables? > > > > Thanks, > > > > Ed > > > > Hey Ed- > > Once you have your database connection stuff setup then all you have > to do is run: > > $ rake db:migrate > > There is also a new_migration script in the script dir of the sampel > app. To make a new migration you do this: > > $ script/new_migration add_foo_to_bar > > > That schema task is something else so don't sweat that one right now. > > 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 > Ah that's so easy. Thanks Ezra! Ed From merb-devel at rubyforge.org Mon Dec 4 12:10:47 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Mon, 4 Dec 2006 11:10:47 -0600 Subject: [Merb-devel] Merb on Win32 Platform Message-ID: <106a0270612040910j7f3229afi1bf05c518eca131f@mail.gmail.com> I'm trying to get Merb running on Windows XP SP2 and am experiencing some difficulties. I load http://localhost:4000/posts/new in my browser expecting to see the contents of new.herb rendered. However the following error is reported: Request: PATH_INFO: /posts/new Params: {"action"=>"new", "id"=>nil, "controller"=>"posts"} Routing to controller: Posts action: new Parsing HTTP Input took: 0.016 seconds undefined local variable or method `session' for # - (NameError) E:/Dev/Ruby/merb-0.0.7/examples/sample_app/dist/app/controllers/posts.rb:5:in `new' After a bit of grepping I see that merb.yml has commented out ":session: true". So I uncomment that line and restart merb. This leads to the following error on the console: C:/Ruby/lib/ruby/gems/1.8/gems/merb-0.0.7/bin/merb:139:in `fork': the fork() function is unimplemented on this machine (NotImplementedError) from C:/Ruby/lib/ruby/gems/1.8/gems/merb-0.0.7/bin/merb:139:in `start' from C:/Ruby/lib/ruby/gems/1.8/gems/merb-0.0.7/bin/merb:114:in `run' from C:/Ruby/lib/ruby/gems/1.8/gems/merb-0.0.7/bin/merb:193 from C:/Ruby/bin/merb:18:in `load' from C:/Ruby/bin/merb:18 I tried to resolve this by adding the following to the end of the "require ..." lines in merb.rb: require 'daemons' require 'win32-pr' require 'win32-process' require 'win32-dir' require 'win32-file' require 'win32-file-stat' This did not solve the problem. Anyone familiar with how to get merb working on a win32 platform? Ruby newbie here, probably asking silly questions; please be patient :) Thanks, Ed From merb-devel at rubyforge.org Mon Dec 4 12:40:40 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Mon, 4 Dec 2006 10:40:40 -0700 Subject: [Merb-devel] Mailing List Modification Request Message-ID: Ezra, Is there a setting that can be changed to have the merb mailing list set the from address as the users from as opposed to merb-devel at rubyforge.org? Thanks! Josh -- Josh Knowles joshknowles at gmail.com http://joshknowles.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20061204/bc5bb7aa/attachment.html From merb-devel at rubyforge.org Mon Dec 4 14:16:08 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Mon, 4 Dec 2006 11:16:08 -0800 Subject: [Merb-devel] Merb on Win32 Platform In-Reply-To: <106a0270612040910j7f3229afi1bf05c518eca131f@mail.gmail.com> References: <106a0270612040910j7f3229afi1bf05c518eca131f@mail.gmail.com> Message-ID: <43612D63-C7FC-4C75-8BA0-28F440776861@engineyard.com> On Dec 4, 2006, at 9:10 AM, merb-devel at rubyforge.org wrote: > I'm trying to get Merb running on Windows XP SP2 and am experiencing > some difficulties. I load http://localhost:4000/posts/new in my > browser expecting to see the contents of new.herb rendered. However > the following error is reported: > > Request: PATH_INFO: /posts/new > Params: {"action"=>"new", "id"=>nil, "controller"=>"posts"} > Routing to controller: Posts action: new > Parsing HTTP Input took: 0.016 seconds > undefined local variable or method `session' for # - > (NameError) > E:/Dev/Ruby/merb-0.0.7/examples/sample_app/dist/app/controllers/ > posts.rb:5:in > `new' > > > > I tried to resolve this by adding the following to the end of the > "require ..." lines in merb.rb: > require 'daemons' > require 'win32-pr' > require 'win32-process' > require 'win32-dir' > require 'win32-file' > require 'win32-file-stat' > > This did not solve the problem. Anyone familiar with how to get merb > working on a win32 platform? Ruby newbie here, probably asking silly > questions; please be patient :) > > Thanks, > > Ed Hey Ed- Sorry I should put some docs about the session container. You have to start merb with the -s option to start the session drb server. So to use sessions you must either set the :session: config option to the port number to run the drb session container on or start merb the following way: $ merb -s 33333 That will start the merb drb server on port 33333 and link it into merb. If you don't need sessions then don't turn on this option and remove the session stuff from the posts controller. The sample app is really just kind of a playground. its not reallyt an app yet ;) As far as the win32 process stuff please let me know if the drb server works for you with the win32process stuff. If the sessions container doesn't work on win let me know and I will show you how to use ActiveRecords for the merb sessions instead of a drb server. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From merb-devel at rubyforge.org Tue Dec 5 00:06:47 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Mon, 4 Dec 2006 23:06:47 -0600 Subject: [Merb-devel] Merb on Win32 Platform In-Reply-To: <43612D63-C7FC-4C75-8BA0-28F440776861@engineyard.com> References: <106a0270612040910j7f3229afi1bf05c518eca131f@mail.gmail.com> <43612D63-C7FC-4C75-8BA0-28F440776861@engineyard.com> Message-ID: <106a0270612042106l184ad447i7f58a88ba333ba3a@mail.gmail.com> On 12/4/06, merb-devel at rubyforge.org wrote: > > On Dec 4, 2006, at 9:10 AM, merb-devel at rubyforge.org wrote: > > > I'm trying to get Merb running on Windows XP SP2 and am experiencing > > some difficulties. I load http://localhost:4000/posts/new in my > > browser expecting to see the contents of new.herb rendered. However > > the following error is reported: > > > > Request: PATH_INFO: /posts/new > > Params: {"action"=>"new", "id"=>nil, "controller"=>"posts"} > > Routing to controller: Posts action: new > > Parsing HTTP Input took: 0.016 seconds > > undefined local variable or method `session' for # - > > (NameError) > > E:/Dev/Ruby/merb-0.0.7/examples/sample_app/dist/app/controllers/ > > posts.rb:5:in > > `new' > > > > > > > > I tried to resolve this by adding the following to the end of the > > "require ..." lines in merb.rb: > > require 'daemons' > > require 'win32-pr' > > require 'win32-process' > > require 'win32-dir' > > require 'win32-file' > > require 'win32-file-stat' > > > > This did not solve the problem. Anyone familiar with how to get merb > > working on a win32 platform? Ruby newbie here, probably asking silly > > questions; please be patient :) > > > > Thanks, > > > > Ed > > > Hey Ed- > > Sorry I should put some docs about the session container. You have > to start merb with the -s option to start the session drb server. So > to use sessions you must either set the :session: config option to > the port number to run the drb session container on or start merb the > following way: > > $ merb -s 33333 > > That will start the merb drb server on port 33333 and link it into > merb. If you don't need sessions then don't turn on this option and > remove the session stuff from the posts controller. The sample app is > really just kind of a playground. its not reallyt an app yet ;) > > As far as the win32 process stuff please let me know if the drb > server works for you with the win32process stuff. If the sessions > container doesn't work on win let me know and I will show you how to > use ActiveRecords for the merb sessions instead of a drb server. > > Cheers- > -- Ezra Zygmuntowicz > -- Lead Rails Evangelist > -- ez at engineyard.com > -- Engine Yard, Serious Rails Hosting > -- (866) 518-YARD (9273) > > > _______________________________________________ It turns out I used the wrong names for the required gems. Instead of... require 'daemons' require 'win32-pr' require 'win32-process' require 'win32-dir' require 'win32-file' require 'win32-file-stat' I should have done... require 'win32/process' require 'win32/file' require 'win32/file/stat' Using merb -s 33333 then seems to starts drb. The console shows that it has started and is bound to 0.0.0.0 and listening on port 33333. However, mongrel appears to start twice and fails due to bind error. This is b/c mongrel is unable to stop and start and tries to bind to the same listening port the second time mongrel_start is called? Ruby reports that Process.setsid is not supported on the win32 platform. I expect there will be many more api related issues while learning ruby and trying to get merb to run on windows. My goal is to create a simple ruby application that will be used by a small office to create, read, update, and delete HTML newsletters. Maybe merb is the right tool for the job. Anyway, I digress... I'd appreciate it if you would show me how to use ActiveRecords for the merb sessions instead of a drb server. Thanks, Ed From merb-devel at rubyforge.org Thu Dec 7 12:19:39 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Thu, 7 Dec 2006 11:19:39 -0600 Subject: [Merb-devel] What does js partial(...) do? Message-ID: <106a0270612070919g4b3058c8lf366b374f247f3@mail.gmail.com> In the example application named "sample_app", comment.jerb contains the following line: $('comments').update(<%=js partial(:comments) %>); What does the 'js' method do to/with, if anything at all, 'partial(:comments)'? Merb is quite fun to use and I'm starting to get a feel for it and ruby. I'm surprised at how quickly it enables me to create my little application. Are there plans to make Merb more visible as some other mini-framework projects have done (thinking of Camping as an example)? Ed From merb-devel at rubyforge.org Thu Dec 7 12:48:30 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Thu, 07 Dec 2006 12:48:30 -0500 Subject: [Merb-devel] What does js partial(...) do? In-Reply-To: <106a0270612070919g4b3058c8lf366b374f247f3@mail.gmail.com> References: <106a0270612070919g4b3058c8lf366b374f247f3@mail.gmail.com> Message-ID: <457853EE.6010902@gmail.com> This file in the track holds all a few Java Script goodies: http://merb.devjavu.com/projects/merb/browser/lib/merb/mixins/javascript_mixin.rb You should check that file out! But in there it says: "calls .to_json on data." Hence it converts converts the output of partial into JSon from what "I" understand... Hope that helps! Also, what do you mean by, "make Merb more visible" ? Chino P.S. Come hang out in merb at freenode ! merb-devel at rubyforge.org wrote: > In the example application named "sample_app", comment.jerb contains > the following line: > > $('comments').update(<%=js partial(:comments) %>); > > What does the 'js' method do to/with, if anything at all, 'partial(:comments)'? > > Merb is quite fun to use and I'm starting to get a feel for it and > ruby. I'm surprised at how quickly it enables me to create my little > application. Are there plans to make Merb more visible as some other > mini-framework projects have done (thinking of Camping as an example)? > > Ed > _______________________________________________ > Merb-devel mailing list > Merb-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/merb-devel > From merb-devel at rubyforge.org Thu Dec 7 13:46:10 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Thu, 7 Dec 2006 10:46:10 -0800 Subject: [Merb-devel] What does js partial(...) do? In-Reply-To: <106a0270612070919g4b3058c8lf366b374f247f3@mail.gmail.com> References: <106a0270612070919g4b3058c8lf366b374f247f3@mail.gmail.com> Message-ID: On Dec 7, 2006, at 9:19 AM, merb-devel at rubyforge.org wrote: > In the example application named "sample_app", comment.jerb contains > the following line: > > $('comments').update(<%=js partial(:comments) %>); > > What does the 'js' method do to/with, if anything at all, 'partial > (:comments)'? > > Merb is quite fun to use and I'm starting to get a feel for it and > ruby. I'm surprised at how quickly it enables me to create my little > application. Are there plans to make Merb more visible as some other > mini-framework projects have done (thinking of Camping as an example)? > > Ed Hey Ed- partial(:comments) just renders the _comments.herb partial template. The js method calls .to_json on that partial content to properly escape the text for the browser so it doesn't choke on unescaped html. .jerb templates set the content type to javascript so that the browser executes it. Similar to rjs except .jerb you just write your javascript yourself and then use erb tags to make parts of the js dynamic. Merb is fun, I'm glad you like it. I do plan on making a merb wiki or site soon. I am just super busy so I am not sure when I will get the time. Also Ed I think you were the one asking about ActiveRecord sessions and reading the rails sessions in merb. Last night I commited this functionality. I made an ActiveRecord sessions store that can use the same sessions table as your rails app. You can also pass the session_id in the query styring when you redirect to merb from rails. Merb will pick up the sessions_id from the query string and find the proper sessions from the rails sessions table. You can modify and save the sessions and rails will pick up those changes ion its side as well. To use this you just need to make sure you have a sessions table (look at the sample app for a migration to create one) and then you must set a config option in your dist/conf/merb.yml --- :host: 0.0.0.0 :port: "4000" :allow_reloading: true :sql_session: true ^^ the sql_session is set to true and then merb will take care of setting up the AR sessions. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From merb-devel at rubyforge.org Thu Dec 7 14:08:30 2006 From: merb-devel at rubyforge.org (merb-devel at rubyforge.org) Date: Thu, 7 Dec 2006 13:08:30 -0600 Subject: [Merb-devel] What does js partial(...) do? In-Reply-To: References: <106a0270612070919g4b3058c8lf366b374f247f3@mail.gmail.com> Message-ID: <106a0270612071108r599338byc5fb3cc97e9efe00@mail.gmail.com> On 12/7/06, merb-devel at rubyforge.org wrote: ------8<------8<------8<------8<------ > The js method calls .to_json on that partial content to properly > escape the text for the browser so it doesn't choke on unescaped > html. .jerb templates set the content type to javascript so that the > browser executes it. Similar to rjs except .jerb you just write your > javascript yourself and then use erb tags to make parts of the js > dynamic. Ahh, very helpful info. ------8<------8<------8<------8<------ > sessions and reading the rails sessions in merb. Last night I > commited this functionality. I made an ActiveRecord sessions store > that can use the same sessions table as your rails app. You can also > pass the session_id in the query styring when you redirect to merb > from rails. Merb will pick up the sessions_id from the query string > and find the proper sessions from the rails sessions table. You can > modify and save the sessions and rails will pick up those changes ion > its side as well. ------8<------8<------8<------8<------ That's super news Ezra! Thanks for implementing that option - it really helps what I'm doing with Merb. Thanks again, Ed From ez at engineyard.com Thu Dec 7 14:22:35 2006 From: ez at engineyard.com (Ezra Zygmuntowicz) Date: Thu, 7 Dec 2006 11:22:35 -0800 Subject: [Merb] [Merb-devel] Mailing List Modification Request In-Reply-To: References: Message-ID: <6769334C-78E2-42A3-B02C-C904AA8CA96E@engineyard.com> On Dec 4, 2006, at 9:40 AM, merb-devel at rubyforge.org wrote: > Ezra, > > Is there a setting that can be changed to have the merb mailing > list set the from address as the users from as opposed to merb- > devel at rubyforge.org? > > Thanks! > > Josh > Hey Josh- I just changed the list to not do that, thanks. Sending this as a test to see if it works now.. -- 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 Dec 18 18:57:11 2006 From: rogelio.samour at gmail.com (Rogelio J. Samour) Date: Mon, 18 Dec 2006 17:57:11 -0600 Subject: Upload Progress (mup.js) typo Message-ID: I was using the sample_app and found out that the progress bar wasn't changing color. It was updating the percentage but wasn't updating the width of the status bar style... I found that the mup.js was missing and appended "px" So here it is: my first ever Merb patch! http://pastie.caboo.se/28450 cheers, -rjs- (the_mug) Blog: http://www.rosamour.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20061218/3dd904dd/attachment.html From ez at engineyard.com Mon Dec 18 19:04:24 2006 From: ez at engineyard.com (Ezra Zygmuntowicz) Date: Mon, 18 Dec 2006 16:04:24 -0800 Subject: Upload Progress (mup.js) typo In-Reply-To: References: Message-ID: <31AEBC3F-F07F-4EB0-A1DD-93F1B48ECEA2@engineyard.com> On Dec 18, 2006, at 3:57 PM, Rogelio J. Samour wrote: > I was using the sample_app and found out that the progress bar > wasn't changing color. It was updating the percentage but wasn't > updating the width of the status bar style... > > I found that the mup.js was missing and appended "px" > > So here it is: my first ever Merb patch! > > http://pastie.caboo.se/28450 > > cheers, > > -rjs- > (the_mug) > Blog: http://www.rosamour.com > ______________________________________________ Thanks man. Applied: http://merb.devjavu.com/projects/merb/changeset/111 Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From fernand.galiana at gmail.com Sat Dec 23 02:49:47 2006 From: fernand.galiana at gmail.com (Fernand Galiana) Date: Sat, 23 Dec 2006 00:49:47 -0700 Subject: Generating a merb app skeleton... Message-ID: <30ab479c0612222349xf227387u496d4915fe0c8371@mail.gmail.com> I have just started playing with merb. I think this framework has great potential so ATTA BOYS are in order !! Perhaps I missed something in the readme file, but how do I generate a default app in merb. I was looking for something like the cmd below to generate the app hierarchy ?? > merb myapp -Fernand -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20061223/32f09800/attachment.html From ez at engineyard.com Sat Dec 23 12:57:58 2006 From: ez at engineyard.com (Ezra Zygmuntowicz) Date: Sat, 23 Dec 2006 09:57:58 -0800 Subject: Generating a merb app skeleton... In-Reply-To: <30ab479c0612222349xf227387u496d4915fe0c8371@mail.gmail.com> References: <30ab479c0612222349xf227387u496d4915fe0c8371@mail.gmail.com> Message-ID: <14D9CEA3-BED2-4D49-9106-EC9F6CB0FAD7@engineyard.com> On Dec 22, 2006, at 11:49 PM, Fernand Galiana wrote: > I have just started playing with merb. I think this framework has > great potential > so ATTA BOYS are in order !! > > Perhaps I missed something in the readme file, but how do I > generate a default > app in merb. > > I was looking for something like the cmd below to generate the app > hierarchy ?? > > > merb myapp > > -Fernand Fernand- There is not an app generator yet. I have it almost done but not released yet. So depending on which versions of merb you are using the way to start a new app is to copy the examples/app_skeleton from the merb gem to somewhere you want it to go. If you are using the latest merb from svn(highly recommended) then I did check in the app generator but there is a weird bug where it doesn't copy all the dirs and files from the skeleton. So if you are using trunk then look in / lib/merb/generators/merb_app/skeleton and copy it from there. I will have the generator working and checked in in a few days when I get ready to release the 0.0.9 gem. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From rogelio.samour at gmail.com Tue Dec 26 11:02:15 2006 From: rogelio.samour at gmail.com (Rogelio J. Samour) Date: Tue, 26 Dec 2006 10:02:15 -0600 Subject: [PATCH] Fastthread 0.5.3.1 with merb edge (124) Message-ID: I checked out the latest merb 'trunk' and after installing it as a gem... (fresh install) I got the dreaded "fastthread not loaded: fastthread must be required before thread" error when starting up an instance of merb. Even without dRB. So I patched the merb.rb file to include fastthread before anything else if it's installed. Check it. Merry Christmas! -rjs- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20061226/1cda8e6d/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: fastthread_bug.patch Type: text/x-patch Size: 647 bytes Desc: not available Url : http://rubyforge.org/pipermail/merb-devel/attachments/20061226/1cda8e6d/attachment.bin From rogelio.samour at gmail.com Wed Dec 27 12:58:03 2006 From: rogelio.samour at gmail.com (Rogelio J. Samour) Date: Wed, 27 Dec 2006 11:58:03 -0600 Subject: ARSession Woes! Message-ID: I'm having an issue with ARsessions... I have a rails app AND a merb app both under the same domain... I have redirects working for this to be seamless... however, the session started on merb is different than the session started in the rails app... like so.. http://pastie.caboo.se/private/r1ar42qiaekrqjdt6y Any ideas why? The only difference I see, but dunno where to change this, is that the rails app uses utc datetimes... the merb app doesn't.. one can see that on the attributes. Thanks! Cheers, -rjs- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20061227/33aac22e/attachment.html From rogelio.samour at gmail.com Wed Dec 27 15:39:55 2006 From: rogelio.samour at gmail.com (Rogelio J. Samour) Date: Wed, 27 Dec 2006 14:39:55 -0600 Subject: ARSession Woes! In-Reply-To: References: Message-ID: Since I'm on a role in talking to myself... here it goes... I 'fixed' it... the rails app was sending the session_id as cookies['_session_id'] and merb was trying to get it from cookies[:session_id].... sooo. I hacked it for now but I'll have to figure out where to change that name later... I set cookies[:session_id] = cookies['_session_id'] under MERB_GEM_ROOT/lib/merb/session/merb_ar_session.rb It works now. But any ideas or suggestions are welcome. :-) cheers, -rjs- On 12/27/06, Rogelio J. Samour wrote: > > I'm having an issue with ARsessions... I have a rails app AND a merb app > both under the same domain... I have redirects working for this to be > seamless... however, the session started on merb is different than the > session started in the rails app... like so.. > http://pastie.caboo.se/private/r1ar42qiaekrqjdt6y > > Any ideas why? > > The only difference I see, but dunno where to change this, is that the > rails app uses utc datetimes... the merb app doesn't.. one can see that on > the attributes. > > Thanks! > > Cheers, > > > -rjs- -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/merb-devel/attachments/20061227/3c108e88/attachment.html From ez at engineyard.com Wed Dec 27 16:02:52 2006 From: ez at engineyard.com (Ezra Zygmuntowicz) Date: Wed, 27 Dec 2006 13:02:52 -0800 Subject: ARSession Woes! In-Reply-To: References: Message-ID: <16458863-8CDF-43C2-85B8-B928373E71C2@engineyard.com> On Dec 27, 2006, at 12:39 PM, Rogelio J. Samour wrote: > Since I'm on a role in talking to myself... here it goes... > > I 'fixed' it... the rails app was sending the session_id as cookies > ['_session_id'] and merb was trying to get it from cookies > [:session_id].... > > sooo. I hacked it for now but I'll have to figure out where to > change that name later... > I set cookies[:session_id] = cookies['_session_id'] under > MERB_GEM_ROOT/lib/merb/session/merb_ar_session.rb > > It works now. But any ideas or suggestions are welcome. :-) > > cheers, > > -rjs- > > > On 12/27/06, Rogelio J. Samour < rogelio.samour at gmail.com> > wrote:I'm having an issue with ARsessions... I have a rails app AND > a merb app both under the same domain... I have redirects working > for this to be seamless... however, the session started on merb is > different than the session started in the rails app... like so.. > http://pastie.caboo.se/private/r1ar42qiaekrqjdt6y > > Any ideas why? > > The only difference I see, but dunno where to change this, is that > the rails app uses utc datetimes... the merb app doesn't.. one can > see that on the attributes. > > Thanks! > > Cheers, > > > -rjs- > Hey Man- I guess I should change merb to use _session_id so its easy to use the rails cookie. One way around it without changing any code is to make the redirect to merb have ?session_id=dkhfkjdfkadjfjkadfh appended to the query string. That will fix it for now. I will change merb to use _session_id so this is more seamless though. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez at engineyard.com -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) From rogelio.samour at gmail.com Wed Dec 27 16:08:11 2006 From: rogelio.samour at gmail.com (Rogelio J. Samour) Date: Wed, 27 Dec 2006 15:08:11 -0600 Subject: ARSession Woes! In-Reply-To: <16458863-8CDF-43C2-85B8-B928373E71C2@engineyard.com> References: <16458863-8CDF-43C2-85B8-B928373E71C2@engineyard.com> Message-ID: Actually. I did the following: vi config/environment.rb at the very bottom, outside of the Rails::Initializer block, I wrote: ActionController::Base.session_options[:session_key] = 'session_id' And that works with merb now. I was thinking of allowing merb to be able to change the session_key as well through the merb_init.rb file. cheers, -rjs- On 12/27/06, Ezra Zygmuntowicz wrote: > > > On Dec 27, 2006, at 12:39 PM, Rogelio J. Samour wrote: > > > Since I'm on a role in talking to myself... here it goes... > > > > I 'fixed' it... the rails app was sending the session_id as cookies > > ['_session_id'] and merb was trying to get it from cookies > > [:session_id].... > > > > sooo. I hacked it for now but I'll have to figure out where to > > change that name later... > > I set cookies[:session_id] = cookies['_session_id'] under > > MERB_GEM_ROOT/lib/merb/session/merb_ar_session.rb > > > > It works now. But any ideas or suggestions are welcome. :-) > > > > cheers, > > > > -rjs- > > > > > > On 12/27/06, Rogelio J. Samour < rogelio.samour at gmail.com> > > wrote:I'm having an issue with ARsessions... I have a rails app AND > > a merb app both under the same domain... I have redirects working > > for this to be seamless... however, the session started on merb is > > different than the session started in the rails app... like so.. > > http://pastie.caboo.se/private/r1ar42qiaekrqjdt6y > > > > Any ideas why? > > > > The only difference I see, but dunno where to change this, is that > > the rails app uses utc datetimes... the merb app doesn't.. one can > > see that on the attributes. > > > > Thanks! > > > > Cheers, > > > > > > -rjs- > > > > > Hey Man- > > > I guess I should change merb to use _session_id so its easy to use > the rails cookie. One way around it without changing any code is to > make the redirect to merb have ?session_id=dkhfkjdfkadjfjkadfh > appended to the query string. That will fix it for now. I will change > merb to use _session_id so this is more seamless though. > > 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/20061227/483e9d85/attachment.html