[Rails] Re: Routing Question

2011-09-01 Thread Conrad Taylor
On Sep 1, 7:03 am, 7stud -- wrote: > Conrad Taylor wrote in post #1019592: > > > On Thu, Sep 1, 2011 at 1:53 AM, 7stud -- wrote: > > >> > The above can easily be fixed by adding a $ after the *.  For example, > > >> > /^[1-9]\d*$/ > > >> Why

Re: [Rails] Re: Re: Re: Routing Question

2011-09-01 Thread Conrad Taylor
On Thu, Sep 1, 2011 at 1:53 AM, 7stud -- wrote: > Conrad Taylor wrote in post #1019488: > > Sent from my iPhone > > > > On Aug 31, 2011, at 1:21 PM, 7stud -- wrote: > > > >>> be > >>> something like the following: > >>> > &g

Re: [Rails] Re: Routing Question

2011-08-31 Thread Conrad Taylor
On Wed, Aug 31, 2011 at 3:07 PM, Bruno Meira wrote: > Hi 7stud, > I wanted a URL like that: /users/:id, where :id could only be one or > more integers, actually the user id. > I don't have in mind any case that this line could'nt be resolve. > Could you give me an example? > Thx ;D > > If this is

Re: [Rails] Re: Re: Routing Question

2011-08-31 Thread Conrad Taylor
Sent from my iPhone On Aug 31, 2011, at 1:21 PM, 7stud -- wrote: > Conrad Taylor wrote in post #1019461: >> On Wed, Aug 31, 2011 at 12:01 PM, Conrad Taylor >> wrote: >> >>>> I read that, and I don't see how applying a regex to the id will help

Re: [Rails] Re: Routing Question

2011-08-31 Thread Conrad Taylor
On Wed, Aug 31, 2011 at 12:01 PM, Conrad Taylor wrote: > On Wed, Aug 31, 2011 at 7:51 AM, 7stud -- wrote: > >> Conrad Taylor wrote in post #1019393: >> > On Wed, Aug 31, 2011 at 7:04 AM, Bruno Meira >> > wrote: >> > >> >> >> > Bruno

Re: [Rails] Re: Routing Question

2011-08-31 Thread Conrad Taylor
On Wed, Aug 31, 2011 at 7:51 AM, 7stud -- wrote: > Conrad Taylor wrote in post #1019393: > > On Wed, Aug 31, 2011 at 7:04 AM, Bruno Meira > > wrote: > > > >> > > Bruno, I would recommend reading section 4.2 of the Rails routing guide: > > > > I re

Re: [Rails] Routing Question

2011-08-31 Thread Conrad Taylor
On Wed, Aug 31, 2011 at 7:27 AM, Conrad Taylor wrote: > On Wed, Aug 31, 2011 at 7:04 AM, Bruno Meira wrote: > >> I have the following problem: >> - I have a controller called UsersController and I need to restrict >> the show URL to use only numbers, How can I do that?

Re: [Rails] Routing Question

2011-08-31 Thread Conrad Taylor
On Wed, Aug 31, 2011 at 7:04 AM, Bruno Meira wrote: > I have the following problem: > - I have a controller called UsersController and I need to restrict > the show URL to use only numbers, How can I do that? > my routes.rb has this line: > resources :users, :except=>[:destroy] > How I add this c

Re: [Rails] Re: Application not accesible

2011-08-24 Thread Conrad Taylor
On Wed, Aug 24, 2011 at 10:58 PM, sridhar pandurangiah wrote: > Frederick Cheung wrote in post #1018216: > > On Aug 24, 10:22am, sridhar pandurangiah > > wrote: > >> > >> I am not sure why Nginx is still accessing /var/www/html when I have > >> mentioned the root directory. > >> > > > > Are your

Re: [Rails] Is OSX Lion a valid choice yet? Any issues?

2011-08-24 Thread Conrad Taylor
On Tue, Aug 23, 2011 at 12:49 PM, comopasta Gr wrote: > Hi, > > My Snow Leopard just let me down and now it could be a "good" moment to > upgrade to Lion. > > How did Mac OS 10.6 let you down? It worked great for me prior to installing Mac OS 10 .7 as far as Rails is concerned. > But I'm not s

Re: [Rails] Is OSX Lion a valid choice yet? Any issues?

2011-08-24 Thread Conrad Taylor
On Tue, Aug 23, 2011 at 1:10 PM, Jason Fleetwood-Boldt wrote: > > I just tried it this morning actually > > When you Install XCode, you have to "install" it from the App Store, THEN > go to /Applications/Install XCode and double click that icon. (So basically > you install it twice, the firs

Re: [Rails] Rails 3 and script/generate

2011-08-22 Thread Conrad Taylor
On Mon, Aug 22, 2011 at 5:50 PM, soldier.coder < geekprogrammer...@googlemail.com> wrote: > what is rails 3 equivalent to script/generate? I am trying to use > Twitter-OAuth and it has a generator and I am not sure how to use it. > > The documentation is all for rails 2.3. Any ideas are apprecia

Re: [Rails] Rails 3.1 without breaking

2011-08-22 Thread Conrad Taylor
Sent from my iPad On Aug 20, 2011, at 8:14 AM, Rodrigo Ruiz wrote: > Hi, I'd like some help to install rails 3.1 without breaking old projects > that use rails 3.0.9. > > If I install rails 3.1, will it delete rails 3.0.9? > > I don't understand much about it, but I think all my gems are in

Re: [Rails] juggernaut server

2011-08-21 Thread Conrad Taylor
On Sun, Aug 21, 2011 at 7:21 AM, Kapil K. wrote: > How to install juggernaut server in rails 3, and how to chat in the > rails by using the juggernaut server please tell what the solution for > juggernaut server > > Kapil, you can start by looking at the links here: http://lmgtfy.com/?q=juggerna

Re: [Rails] Which is the best ruby version for OS X lion?

2011-08-19 Thread Conrad Taylor
On Fri, Aug 19, 2011 at 6:25 PM, radhames brito wrote: > I just want to know if someone can tell which ruby version is the most > compatible with MAC OS X 10.7. Ruby 1.9.2 just blows up everywhere , > yard blows up , pg just crashes with no feedback, is a mess. Can > someone tell me what can i do

Re: [Rails] Re: "bundle install" fails because of git gem

2011-08-07 Thread Conrad Taylor
On Sun, Aug 7, 2011 at 2:11 AM, Frederick Cheung wrote: > > > On Aug 7, 2:28 am, jjb123 wrote: > > Yep, it's installed (I've used it on the server before). I'm not sure > > but I think this has something to do with RVM changing all of the > > application paths but I don't really know how to diag

Re: [Rails] Re: Rails 3 possible bug in Routing

2011-08-06 Thread Conrad Taylor
On Sat, Aug 6, 2011 at 2:52 AM, john paul wrote: > Hi sir, > > I have create one rails application ,am creating user form and > using the session (logged on) and (logged out) , i dont know how its > used am newipe in rails pls help > > regards, > john > > John, I would recommend reading the

Re: [Rails] Can't destroy record

2011-08-06 Thread Conrad Taylor
On Sat, Aug 6, 2011 at 2:21 AM, depassion wrote: > so when attempting to destroy a record i get this in the server log > output: > > AREL (0.4ms) DELETE FROM "items" WHERE "items"."id" = 39 > Started GET "/items/20" for 127.0.0.1 at 2011-08-06 10:59:27 +0200 > AbstractController::ActionNotFound

Re: [Rails] Metal - How can i do to implement the same effect in Rails3?

2011-08-04 Thread Conrad Taylor
On Thu, Aug 4, 2011 at 12:09 AM, Quon wrote: > --code-begin > # Allow the metal piece to run in isolation > require(File.dirname(__FILE__) + "/../../config/environment") unless > defined?(Rails) > > class Accelerator > def self.call(env) >if env["PATH_INFO"] =~ /^

Re: [Rails] How to install new version of SQLite in the bundle?

2011-08-02 Thread Conrad Taylor
On Tue, Aug 2, 2011 at 12:30 PM, Rubyist Rohit wrote: > I am learning rails and referring to the -- Ruby on Rails Guides: > Getting Started with Rails. > > I executed command: bundle install > > It displayed a lot of names and among them was SQLite. I see that it is > of old version and want to i

Re: [Rails] Heroku deployment issue

2011-08-02 Thread Conrad Taylor
On Tue, Aug 2, 2011 at 1:23 AM, SW Engineer wrote: > I'm following this tutorial, and have followed the steps to deploying to > 'Heroku'. > > When I open the application from 'Heroku', this is what I get: > > http://furious-sunrise-574.heroku.com/ > > Why isn't my application showing up? > > Hi,

Re: [Rails] Re: setting an extra attribute of the join model.

2011-07-31 Thread Conrad Taylor
On Sun, Jul 31, 2011 at 1:47 PM, Conrad Taylor wrote: > On Sun, Jul 31, 2011 at 11:12 AM, Mauro wrote: > >> On 30 July 2011 21:22, Mauro wrote: >> > https://gist.github.com/1114858. >> > How can I set the quantity DeliveryItem in the same form so that when >>

Re: [Rails] Re: setting an extra attribute of the join model.

2011-07-31 Thread Conrad Taylor
On Sun, Jul 31, 2011 at 11:12 AM, Mauro wrote: > On 30 July 2011 21:22, Mauro wrote: > > https://gist.github.com/1114858. > > How can I set the quantity DeliveryItem in the same form so that when > > I update the customer attributes the Delivery is created with products > > and their quantity? >

Re: [Rails] Porting Rails 3.0 app to 3.1

2011-07-29 Thread Conrad Taylor
On Fri, Jul 29, 2011 at 1:26 AM, Karthikeyan wrote: > Hello rails Community, > > I have many applications written in Rails 3.0.x , now since Rails 3.1 > is arriving, I am wondering how to port these apps to 3.1? Is there > any formal guide for this? > > Karthikeyan, you might want to give the fol

Re: [Rails] Help with heroku and amazon s3 and paperclip

2011-07-28 Thread Conrad Taylor
Sent from my iPhone On Jul 28, 2011, at 6:52 PM, Rodrigo Ruiz wrote: > Well, as the subject, I want to use those 3. Problem is I don't want to use > amazon s3 in development, I want to use it only on heroku. > > How do I do that? > > Thank you, > Rodrigo > If you're in development now, then

Re: [Rails] Dreamhost shared hosting - mysql2 - db creation issue

2011-07-26 Thread Conrad Taylor
On Tue, Jul 26, 2011 at 3:14 AM, ct9a wrote: > hi there, > i decided to build a small rails application on dreamhost (and not my > VM ubuntu machine this time). > > I have set up database.yml correctly by copying the user credentials > and host name from the db administration panel. > > The pro

Re: [Rails] Help with queries

2011-07-24 Thread Conrad Taylor
On Sun, Jul 24, 2011 at 6:05 AM, Conrad Taylor wrote: > On Sat, Jul 23, 2011 at 9:56 PM, Rodrigo Ruiz wrote: > >> Hi, Id like to do something like that: >> >> @payment_history = PaymentHistory.where("company_id = #{@company.id} AND >> created_at <= #{Tim

Re: [Rails] Help with queries

2011-07-24 Thread Conrad Taylor
On Sat, Jul 23, 2011 at 9:56 PM, Rodrigo Ruiz wrote: > Hi, Id like to do something like that: > > @payment_history = PaymentHistory.where("company_id = #{@company.id} AND > created_at <= #{Time.now} AND create_at >= #{Time.now - 1.month}").first > Rodrigo, you might be able to do something like t

Re: [Rails] [OSS] [ANN] / [Request for Help] Rails one step installing for *nix

2011-07-23 Thread Conrad Taylor
On Sat, Jul 23, 2011 at 2:18 PM, Ryan Wilcox wrote: > Hello everyone, > > Quick, off the top of your head, how many steps does it take to get a > fresh machine running a Rails project, with best practices from the > community? > > ...I'll let you think > > ...Got it?.. > > 8. > > 8 steps to g

Re: [Rails] spork error: Gem::LoadError

2011-07-17 Thread Conrad Taylor
On Sat, Jul 16, 2011 at 4:34 AM, 7stud -- wrote: > === > $ spork > Using RSpec > Preloading Rails environment > You have already activated spork 0.9.0.rc8, but your Gemfile requires > spork 0.8.4. Consider using bundle exec. (Gem::LoadError) > === > > After updating my Gemfile to newer versions o

Re: [Rails] Re: Re: bundler does not work as advertised!

2011-07-17 Thread Conrad Taylor
On Sun, Jul 17, 2011 at 2:10 AM, 7stud -- wrote: > Conrad Taylor wrote in post #1011168: > > On Sat, Jul 16, 2011 at 5:08 PM, 7stud -- wrote: > > > >> I get the same autotest error after doing that. > >> > >> > > Can you execute your tests witho

Re: [Rails] Re: bundler does not work as advertised!

2011-07-16 Thread Conrad Taylor
On Sat, Jul 16, 2011 at 5:08 PM, 7stud -- wrote: > I get the same autotest error after doing that. > > Can you execute your tests without spork and autotest? If so, can you execute your test with spork? -Conrad > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message b

Re: [Rails] Re: bundler does not work as advertised!

2011-07-16 Thread Conrad Taylor
On Sat, Jul 16, 2011 at 2:30 PM, 7stud -- wrote: > $ bundle show spork > /Users/Me/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/spork-0.8.4 > > Hi, please do the following: $ bundle update spork $ bundle exec spork Good luck, -Conrad > -- > Posted via http://www.ruby-forum.com/. > > -- > Yo

Re: [Rails] ActiveSupport::OrderedHash disappears?

2011-07-14 Thread Conrad Taylor
On Thu, Jul 14, 2011 at 2:47 PM, Alexey Muranov wrote: > I noticed that ActiveSupport::OrderedHash disappeared from the Rails API > pages. > Does it mean that it is going to be deprecated? > > I know that Hash is ordered in Ruby 1.9, but this subject seems > controversial, and in my opinion the or

Re: [Rails] different code for each record, how to implement??

2011-07-12 Thread Conrad Taylor
On Tue, Jul 12, 2011 at 9:46 AM, Ramon Leon wrote: > On 07/12/2011 08:42 AM, Conrad Taylor wrote: > >> The above class can be refactored as to the following: >> >> class SiteFactory >> def self.create( site ) >> site.new >> end >> end >&

Re: [Rails] different code for each record, how to implement??

2011-07-12 Thread Conrad Taylor
On Tue, Jul 12, 2011 at 8:33 AM, Conrad Taylor wrote: > On Tue, Jul 12, 2011 at 2:02 AM, aupayo wrote: > >> Hi, >> >> I want to screen scrape information from some websites (I have >> permission to do it). >> >> I am using the Mechanize plugin. The web

Re: [Rails] different code for each record, how to implement??

2011-07-12 Thread Conrad Taylor
On Tue, Jul 12, 2011 at 2:02 AM, aupayo wrote: > Hi, > > I want to screen scrape information from some websites (I have > permission to do it). > > I am using the Mechanize plugin. The websites are different from each > other, so I need to write a different RoR code to screen scrape each > websit

Re: [Rails] Rails 3.1 & RSpec: Puzzled by template rendering failures

2011-07-10 Thread Conrad Taylor
On Sun, Jul 10, 2011 at 10:33 AM, Leigh Daniels wrote: > Hi All, > > I'm starting a Rails 3.1 app. Two tests which involve invalid models are > failing and I don't understand why. The tests are the stock tests generated > by the rails rspec generator. I'm new to RSpec so I'm probably missing > som

Re: [Rails] Fast identification (maybe fingerprint) using Ruby?

2011-07-08 Thread Conrad Taylor
On Thu, Jul 7, 2011 at 1:56 AM, Stefano wrote: > Hi guys > > The project I am working on has a webpage where users register. We > want to be able to keep track of how many times each user visits our > premises. Because it is a somewhat "private" business we are unable to > use some kind of member

Re: [Rails] adding anchor in the controller

2011-07-08 Thread Conrad Taylor
On Fri, Jul 8, 2011 at 1:21 PM, Paul wrote: > I'd like to rewrite a URL that is passed to me by turning the > parameter into an anchor tag. In other words, if the user requests: > > /my_controller?q=123 > > Does the user click on a link that contains the above URL? -Conrad > I will handle it i

Re: [Rails] Validating for Real Zipcodes

2011-07-08 Thread Conrad Taylor
On Fri, Jul 8, 2011 at 12:29 PM, bertly_the_coder wrote: > Hi guys, > > I have a location sensitive application where clients enter their > zipcodes when signing up. Is there any tool out there, or anyway to > confirm that the zipcode entered is indeed a true and valid zipcode > and not just 5 ra

Re: [Rails] Validating for Real Zipcodes

2011-07-08 Thread Conrad Taylor
On Fri, Jul 8, 2011 at 12:29 PM, bertly_the_coder wrote: > Hi guys, > > I have a location sensitive application where clients enter their > zipcodes when signing up. Is there any tool out there, or anyway to > confirm that the zipcode entered is indeed a true and valid zipcode > and not just 5 ra

Re: [Rails] Validating for Real Zipcodes

2011-07-08 Thread Conrad Taylor
On Fri, Jul 8, 2011 at 12:29 PM, bertly_the_coder wrote: > Hi guys, > > I have a location sensitive application where clients enter their > zipcodes when signing up. Is there any tool out there, or anyway to > confirm that the zipcode entered is indeed a true and valid zipcode > and not just 5 ra

Re: [Rails] Authentication and authorization

2011-07-08 Thread Conrad Taylor
On Fri, Jul 8, 2011 at 9:43 AM, Rodrigo Ruiz wrote: > I'd like some help to do both. > Either an easy way to do it from scratch or a gem. > > I saw the way it's done at Ruby on Rails Tutorial, but couldn't understand > it very well, so thats why I want an easier way (or gem). > I've been told that

Re: [Rails] Speeding up rails boot time in development?

2011-07-07 Thread Conrad Taylor
On Wed, Jul 6, 2011 at 4:23 AM, Evan C wrote: > I recently switched from REE to ruby 1.9.2 and I was shocked by how > long it takes for rails to startup. This isn't as much of an issue in > production, but in development and test environments it's almost > unusable because it's killing my workf

Re: [Rails] Monkey patching a gem (rails_admin, with Rails 3)

2011-07-07 Thread Conrad Taylor
On Wed, Jul 6, 2011 at 8:40 AM, Michel Pigassou wrote: > Hi. > > I'm trying to monkey patch the rails_admin gem. > > First, I tried to add a file in config/initializers containing: > RailsAdmin::MainController.class_eval do > def get_sort_hash > CODE HERE... > end > end > > It was only loaded onc

Re: [Rails] 3.1RC4 or 3.2

2011-07-05 Thread Conrad Taylor
Sent from my iPad On Jul 5, 2011, at 2:40 AM, itsterry wrote: > Just a quickie... > > I'm seeing Rails 3.2 Beta already on Github, though 3.1 is still at > RC4. Is the plan still to release 3.1 or are we skipping straight to > 3.2? > > Forgive me if it's a dumb question: it's asked honestly.

Re: [Rails] How to update Ruby gem version?

2011-07-02 Thread Conrad Taylor
On Sat, Jul 2, 2011 at 8:04 AM, Amrit Pal Pathak wrote: > > > On Sat, Jul 2, 2011 at 10:46 AM, Conrad Taylor wrote: > >> On Sat, Jul 2, 2011 at 7:10 AM, Amrit Pal Pathak < >> amritpalpath...@gmail.com> wrote: >> >>> >>> >>> On Sa

Re: [Rails] How to update Ruby gem version?

2011-07-02 Thread Conrad Taylor
On Sat, Jul 2, 2011 at 7:10 AM, Amrit Pal Pathak wrote: > > > On Sat, Jul 2, 2011 at 5:58 AM, Conrad Taylor wrote: > >> On Sat, Jul 2, 2011 at 2:50 AM, Amrit Pal Pathak < >> amritpalpath...@gmail.com> wrote: >> >>> >>> >>> On Sat

Re: [Rails] How to update Ruby gem version?

2011-07-02 Thread Conrad Taylor
On Sat, Jul 2, 2011 at 2:50 AM, Amrit Pal Pathak wrote: > > > On Sat, Jul 2, 2011 at 5:22 AM, Conrad Taylor wrote: > >> On Sat, Jul 2, 2011 at 12:28 AM, Amrit Pal Pathak < >> amritpalpath...@gmail.com> wrote: >> >>> How can i update my Rails gem v

Re: [Rails] How to update Ruby gem version?

2011-07-02 Thread Conrad Taylor
On Sat, Jul 2, 2011 at 12:28 AM, Amrit Pal Pathak wrote: > How can i update my Rails gem version. to 2.2.2. > Now it is . > gem - v > 1.8.7 > > thanks in advance > > amritpalpathakgne.wordpress.com > Amrit, you can try the following: gem install rails -v 2.2.2 Good luck, -Conrad > -- > You

Re: [Rails] Re: rails 3 nested routing without resources

2011-06-29 Thread Conrad Taylor
On Tue, Jun 28, 2011 at 4:18 AM, tfp44 wrote: > Hello all, > > Don't suppose anyone has a moment to give me a pointer on this one? > > I've tried the following: > > namespace "levelx" do > namespace "levely" do > namespace "levelz" do > root :to => 'levelz#index' > end > root

Re: [Rails] Rails 3.1 sass - WEBrick restart required to see style changes

2011-06-20 Thread Conrad Taylor
On Sun, Jun 19, 2011 at 9:36 AM, Chris Braddock wrote: > Title pretty much says it all. > > Just converted an app to 3.1 using the asset pipeline and I think this is > the last hangup I've got. > > I haven't seen anything about needing to run a watcher or anything, but > right now the only way I c

Re: [Rails] rails 3.0.9

2011-06-15 Thread Conrad Taylor
On Wed, Jun 15, 2011 at 1:14 PM, Mauro wrote: > On 15 June 2011 20:10, Conrad Taylor wrote: > > > > > > Sent from my iPhone > > > > On Jun 15, 2011, at 12:56 PM, Mauro wrote: > > > >> Today was expected the new stable rails release 3.0.9

Re: [Rails] rails 3.0.9

2011-06-15 Thread Conrad Taylor
Sent from my iPhone On Jun 15, 2011, at 12:56 PM, Mauro wrote: > Today was expected the new stable rails release 3.0.9 with some fixed, > among all the problem with escape_javascript. > It seems that it see that has not been released, unfortunately. > Mauro, please keep the following in mind

Re: [Rails] There must be a more elegant way to do this

2011-06-03 Thread Conrad Taylor
On Fri, Jun 3, 2011 at 9:49 AM, skt wrote: > Hello, > > I have a bunch of arrays containing records retrieved from the > database in separate queries. That can't be changed - I have deal with > the different arrays of these records. Each of these records contains, > amongst other data fields, two

Re: [Rails] REMOVE ME

2011-06-02 Thread Conrad Taylor
On Thu, Jun 2, 2011 at 10:58 AM, Brian wrote: > REMOVE ME > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, sen

Re: [Rails] ROR and UML

2011-06-01 Thread Conrad Taylor
On Wed, Jun 1, 2011 at 6:30 AM, Adel Mediouni wrote: > hello, > I work on a project called: experimentation platform of an online > social network. This project is a layer under the Diaspora social > network written in Ruby On Rails follows the MVC architecture. > for my internship report, I am ob

Re: [Rails] Re: Seg fault with Ruby 1.9.2 p180 and Rails 3.1 rc1

2011-05-31 Thread Conrad Taylor
On Tue, May 31, 2011 at 8:05 AM, Peter Bell wrote: > Just in case anyone runs into the same issue, it's documented here: > http://redmine.ruby-lang.org/issues/4611 > > For me, removing postgres solved the problem. Had planned on moving to > MongoDB anyway . . . > > Best Wishes, > Peter > Peter,

Re: [Rails] Re: How do you get simple_form to use the base class and not the subclass?

2011-05-24 Thread Conrad Taylor
On Mon, May 23, 2011 at 4:46 PM, egervari wrote: > I have added the question on Stack Overflow: > > http://stackoverflow.com/questions/6103855/rails-3-model-subclasses-driving-me-crazy-please-help-with-correcting-urls-param > > Feel free to answer it there. There's also a lot more code and > info

Re: [Rails] 3.1 - CoffeeScript in view templates

2011-05-10 Thread Conrad Taylor
On Mon, May 9, 2011 at 8:53 AM, Curtis Schiewek wrote: > With rjs we did this: > # app/views/products/update.rjs > page.replace_html "products", render(@products) > > With jquery and ujs we do this: > # app/views/products/update.js.erb > $("products").update("<%= escape_javascript(render(@products

Re: [Rails] vendoring rails the good ol' fashioned way

2011-04-25 Thread Conrad Taylor
On Mon, Apr 25, 2011 at 9:35 PM, Josh wrote: > rails 3.0.7 here. > > 'bundle package' dumps 29MB into vendor/cache and 129MB into vendor/ > rails That seems to arbitrary and unnecessary. How do I install > rails to vendor/rails these days? 'rake rails:freeze:gems' used to > work great, now

Re: [Rails] Re: TextMate vs EMACS vs RadRails

2011-04-23 Thread Conrad Taylor
On Sat, Apr 23, 2011 at 1:50 PM, Rodrigo Ruiz wrote: > Also how can I compile and run a simple code, like java for example? > > I just typed: > > package Classes; > import java.util.*; > public class Main { > > /** > * @param args > */ > public static void main(String[] args) > { > System.out.

Re: [Rails] ActiveSupport 3.0.6: require 'active_support/core_ext' generates "circular require" warning

2011-04-18 Thread Conrad Taylor
On Mon, Apr 18, 2011 at 3:40 PM, Alexey Muranov wrote: > Hello, > > i noticed some strange warnings when doing > > require 'active_support/core_ext' > > with activesupport 3.0.6. > If i do > > gem 'activesupport', '=3.0.5' > require 'active_support/core_ext' > > then it works fine. > Is this a

Re: [Rails] R: [ANN] Rails 3.0.7 has been released!

2011-04-18 Thread Conrad Taylor
On Mon, Apr 18, 2011 at 3:52 PM, Manuele Dones wrote: > ...and another question ;-) I've noticed running *gem list *that on my > system I've both rails 3.0.6 and 3.0.7, and the same for activerecord, > activesupport, etc etc... > > Is there a problem? is there a way to clean up older versions? > >

Re: [Rails] R: [ANN] Rails 3.0.7 has been released!

2011-04-18 Thread Conrad Taylor
On Mon, Apr 18, 2011 at 3:44 PM, Manuele Dones wrote: > Great! I'm updating the gems... So if i've done a project using rails 3.0.6 > and now i'm updating gems to rails 3.0.7, what I've to do inside my project? > Should I change the Gem file inside my project, from rails 3.0.6 to rails > 3.0.7? or

Re: [Rails] [RUBY] how do generate a random number w specific distribution ( which library ?)

2011-03-12 Thread Conrad Taylor
On Sat, Mar 12, 2011 at 1:07 PM, Colin Law wrote: > On 12 March 2011 20:47, Michael Pavling wrote: > > On 12 March 2011 14:23, Colin Law wrote: > >> On 12 March 2011 13:42, Rob Biedenharn > wrote: > >>> def usually_one > >>> rand < 0.80 ? 1 : 2 > >>> end > >> > >> Yes, much better. I suppose

Re: [Rails] AREL probelm with postgress

2011-03-05 Thread Conrad Taylor
On Sat, Mar 5, 2011 at 11:57 AM, Brad Phelan wrote: > Hi all, > > I am testing locally with MySQL and deploying to heroku ( postgress ) The > following query seems to > generate a PGError. > > SELECT COUNT(*) FROM "events" INNER JOIN "events" "events_2" WHERE > ("events"."schedule_id" = 1 AND "ev

Re: [Rails] HTML5 video not played in ipad

2011-02-07 Thread Conrad Taylor
On Tue, Dec 28, 2010 at 10:44 PM, dare ruby wrote: > Dear Friends, > > Am in process of building a video player rails application, which is > compatabile to Safari, ipad, iphone device. > > I have used below code to render a video and it works fine in safari. > But videos are not played in ipad a

Re: [Rails] Re: One to many ralationships

2011-01-28 Thread Conrad Taylor
Hi, in tour relationship below, you simply need has_one or belongs_to but not both. It really depends where you would like the foreign key. For example, if you use has_one, then the foreign key, job_id, will be in the workers table. If you use the belongs_to, the foreign key, worker_id, shou

Re: [Rails] Re: One to many ralationships

2011-01-28 Thread Conrad Taylor
Sent from my iPhone On Jan 28, 2011, at 7:27 PM, Me wrote: > Nope. > > class Worker < AR > has_one :job > end > > -- > class Job < AR > belongs_to :worker > end > > worker_id in this table > - > -- > You received this message because you are sub

Re: [Rails] Re: Extremely slow start up with ruby 1.9.1 vs 1.8.7

2011-01-16 Thread Conrad Taylor
Hi, in order to put your numbers below into context, can you post the spec for your hardware? Thanks, -Conrad Sent from my iPhone On Jan 15, 2011, at 6:36 PM, Jp Jphpsf wrote: > Count me in :/ > > On ubuntu 10.10 with ruby 1.9.2 and a fresh rails 3.0.3. I created a > cucumber feature with o

Re: [Rails] Re: HTML5 video not played in ipad

2011-01-05 Thread Conrad Taylor
On Wed, Jan 5, 2011 at 8:21 PM, dare ruby wrote: > >> > > > > > > Thanks ben your code works fine in my rails application. > > > > but when i try to change to change the video file path to read from my > > server, it fails again in ipad / iphone alone but works fine in mac > > safari. > > >

Re: [Rails] Re: redgreen unittest with Rails 3 + Ruby 1.9.2

2011-01-03 Thread Conrad Taylor
On Thu, Dec 30, 2010 at 3:01 AM, djangst wrote: > Hi Conrad, > > > add it to your Gemfile as follows: > > gem "redgreen" > > I just tried this again and received the original error which prompted > the workaround a couple of weeks ago: > > no such file to load -- test/unit/ui/console/testrunner

Re: [Rails] ajax not working in rails 3

2011-01-02 Thread Conrad Taylor
Sent from my iPhone On Jan 1, 2011, at 5:33 PM, Mike C wrote: > I followed tutorials and changed my Rails app to use jQuery. All the > needed files are in place, but ajax isn't working. I have the > format.js in the correct place and the js.erb file named after the > action. Calling stuff from

Re: [Rails] Re: Extremely slow start up with ruby 1.9.1 vs 1.8.7

2010-12-30 Thread Conrad Taylor
On Thu, Dec 30, 2010 at 7:59 AM, Colin Law wrote: > On 29 December 2010 23:18, Conrad Taylor wrote: > > ... > > Colin, do you have a sample application? Next, it really depends > > on your overall system and Rails app configuration. For example, > > if you don

Re: [Rails] Re: Re: Re: HTML5 video not played in ipad

2010-12-30 Thread Conrad Taylor
On Thu, Dec 30, 2010 at 3:29 AM, dare ruby wrote: > issing something > > > > Is the HTML file an ERB template that lives in the Rails views > > directory? What web server are you using? > > > > -Conrad > > Thanks, yes its inside my views videos/list.html.erb > > Just using webrick for develo

Re: [Rails] Re: Re: HTML5 video not played in ipad

2010-12-30 Thread Conrad Taylor
Sent from my iPhone On Dec 30, 2010, at 1:49 AM, dare ruby wrote: > Conrad Taylor wrote in post #971410: >> On Wed, Dec 29, 2010 at 9:39 PM, dare ruby wrote: >> >>> also, >>> Also for your reference when i tried to run like, >>> >> Dare, I

Re: [Rails] Re: redgreen unittest with Rails 3 + Ruby 1.9.2

2010-12-29 Thread Conrad Taylor
On Wed, Dec 29, 2010 at 10:49 PM, Conrad Taylor wrote: > On Wed, Dec 29, 2010 at 5:11 PM, djangst wrote: > >> I had to configure as follows to get it working: >> >> # Gemfile >> gem 'mynyml-redgreen' >> >> > djangst, you should be able

Re: [Rails] Re: redgreen unittest with Rails 3 + Ruby 1.9.2

2010-12-29 Thread Conrad Taylor
On Wed, Dec 29, 2010 at 5:11 PM, djangst wrote: > I had to configure as follows to get it working: > > # Gemfile > gem 'mynyml-redgreen' > > djangst, you should be able to add it to your Gemfile as follows: gem "redgreen" Good luck, -Conrad > # test_helper.rb (presumably spec_helper.rb for r

Re: [Rails] Re: HTML5 video not played in ipad

2010-12-29 Thread Conrad Taylor
On Wed, Dec 29, 2010 at 9:39 PM, dare ruby wrote: > dare ruby wrote in post #971390: > >> I first have to ask for clarification: Have you actually tested that the > >> video is actually compatible with iPad and iPhone (i.e. You've actually > >> copied the video to an iOS device and played it back

Re: [Rails] Re: HTML5 video not played in ipad

2010-12-29 Thread Conrad Taylor
Sent from my iPad On Dec 29, 2010, at 6:55 PM, dare ruby wrote: >> I first have to ask for clarification: Have you actually tested that the >> video is actually compatible with iPad and iPhone (i.e. You've actually >> copied the video to an iOS device and played it back)? > > No i have tried th

Re: [Rails] redgreen unittest with Rails 3 + Ruby 1.9.2

2010-12-29 Thread Conrad Taylor
On Wed, Dec 29, 2010 at 4:32 PM, Barb wrote: > I cannot seem to get the redgreen gem working with Rails 3 and Ruby > 1.9.2 for testing. > > I've read everything I can find and can't find a clear answer. I've > tried gem install redgreen as well as gem install mynyml-redgreen. > > Still no luck.

Re: [Rails] Re: Extremely slow start up with ruby 1.9.1 vs 1.8.7

2010-12-29 Thread Conrad Taylor
On Wed, Dec 29, 2010 at 2:04 AM, Colin Law wrote: > On 28 December 2010 11:24, Colin Law wrote: > > On 28 December 2010 09:16, Colin Law wrote: > >> On 27 December 2010 22:08, Micah Geisel wrote: > >>> Ben, did you ever figure out anything here? I'm experiencing the same > >>> problem with 1.9

Re: [Rails] Cucumber + Capybara - web sessions

2010-12-15 Thread Conrad Taylor
On Tue, Dec 14, 2010 at 4:12 AM, Leandro wrote: > I need to do this: > > Scenario: Access private area without a session >Given I don't have a session >When I access private area >Then I should see "You are not logged in" > > Is there a way to remove the session cookie in "Given I do

Re: [Rails] Rails 3 too slow?

2010-12-08 Thread Conrad Taylor
On Wed, Dec 8, 2010 at 10:26 AM, Victor Cisneiros wrote: > I'm using Ruby 1.9.2, Rails 3.0.3, Passenger 3.0.0 and MySQL 5.1 > > rails new library > cd library > > rails generate scaffold Book name:string > rake db:migrate RAILS_ENV=production > > rails console production > 200.times { |i| Book.cre

Re: [Rails] Re: Re: Remove bundler

2010-12-05 Thread Conrad Taylor
On Sun, Dec 5, 2010 at 3:07 PM, Paul Bergstrom wrote: > David Kahn wrote in post #966347: > > On Sun, Dec 5, 2010 at 2:20 PM, Paul Bergstrom > > wrote: > > > >> Can I just delete it? And can I turn off bundler? > >> > >> Did you try deleting the file and running 'bundle install' again? I was > >

Re: [Rails] Fragment cache directory names in Rails 3

2010-11-29 Thread Conrad Taylor
On Mon, Nov 29, 2010 at 12:51 PM, Robert R. wrote: > Is there a way to set the directory structure for the fragment cache? Yes, you can use the following: config.cache_store = :file_store, "/path/to/cache/directory" > I > know by default it is using Zlib.adler32 to generate the directory nam

Re: [Rails] incompatible character encodings: ASCII-8BIT and UTF-8

2010-11-29 Thread Conrad Taylor
On Mon, Mar 29, 2010 at 5:21 AM, Heinz Strunk wrote: > Hello, > > I just tried to migrate one of my applications from ruby 1.8 to ruby 1.9 > and get following error: > Showing app/views/layouts/application.html.erb where line #48 raised: > incompatible character encodings: ASCII-8BIT and UTF-8

Re: [Rails] how to build a smaple application using ror on windows 7

2010-11-06 Thread Conrad Taylor
Hi, I would reading the following in regards to a tutorial: Agile Web Development with Rails 4th Edition by Dave Thomas et al. Also, you may do a google search to locate other references online. Good luck, -Conrad Sent from my iPhone On Nov 6, 2010, at 10:50 AM, venkata reddy wrote: > Hi a

Re: [Rails] Upgrade ROR 2.3.5 to 3.0

2010-10-17 Thread Conrad Taylor
On Sun, Oct 17, 2010 at 7:05 AM, kiran wrote: > Are there any plug-in or standard steps which will help me to upgrade > my application on Windows platform. > > Any help or links will really help. > > Kiran, have you taken a look at the following: Upgrading to Rails 3 Part 1

Re: [Rails] If variable is not empty

2010-10-12 Thread Conrad Taylor
Hi, you can do the following: unless appointment.client.email.blank? # do something end Next, you may want to do additional because some objects in the chain could be nil. Good luck, -Conrad Sent from my iPhone On Oct 12, 2010, at 10:53 AM, "Leonel *.*" wrote: > (MOVED FROM RUBY FORUM)

Re: [Rails] Adding a new RAILS_ENV (== Rails.env)

2010-09-25 Thread Conrad Taylor
Sent from my iPhone On Sep 25, 2010, at 5:43 PM, Pito Salas wrote: > Easy question: what's the 'official' way to add a new RAILS_ENV, and > invoke it when running the server with script/server. Is there a best > practice? Pito, I have always created a specialized environment within the confi

Re: [Rails] Re: what is "line_items"?

2010-08-16 Thread Conrad Taylor
Yes, it's a user defined model. -Conrad On Aug 16, 2010, at 3:43 AM, Gordon Yeong wrote: > ah right. So it is a user defined model. Am I right? > > > On 16 August 2010 20:36, AppleII717 wrote: > line_items is a model/table. > > class LineItem < ActiveRecord::Base > belongs_to :cart > belo

Re: [Rails] Why Rails 3 installation is so pane full

2010-08-08 Thread Conrad Taylor
Shyam, it might help if you described the issue and/or posted the relevant error message(s). Next, Rails 3 requires Ruby 1.8.7 or higher but recommends Ruby 1.9.2. Good luck, -Conrad Sent from my iPhone On Aug 8, 2010, at 10:12 AM, shyam mohan wrote: > Hi all > Why Rails 3 installation is

Re: [Rails] Rails3-beta4: Calling to_json on an ActiveRecord::Relation causes an error

2010-08-03 Thread Conrad Taylor
On Mon, Aug 2, 2010 at 2:26 PM, wprater wrote: > Here is my model and an attempt to convert to json. Whether there is > data returned or not, a circular reference error is thrown. How can I > avoid this? > > wprater, I would recommend trying Rails 3 RC by doing the following: gem install rails

Re: [Rails] Re: Problem with non-ascii characters in forms: "incompatible character encodings: UTF-8 and ASCII-8BIT"

2010-08-02 Thread Conrad Taylor
On Sun, Aug 1, 2010 at 9:27 AM, Rolf Pedersen wrote: > I did search the list, and I found people have similar problems with Ruby > 1.9.1, but not directly comparable to my issue. > In my simple case it DOES work, as long as I use two controller actions > instead of just the one... > > Meanwhile..

Re: [Rails] Re: rails-3.0.0.beta3 install error on ri 'lib' ENOENT

2010-07-17 Thread Conrad Taylor
On Jul 17, 2010, at 8:05 AM, Fernando Perez wrote: >> Installing ri documentation for rails-3.0.0.beta3... >> ERROR: While executing gem ... (Errno::ENOENT) >>No such file or directory - lib > > I just run into the same problem. Any idea? Fernando, have you tried installing Rails 3.0 Beta

Re: [Rails] Re: rails 3 release date

2010-07-06 Thread Conrad Taylor
Sent from my iPhone On Jul 5, 2010, at 4:41 PM, David Zhu wrote: > > >> I read DHH said it should be released by August, can't find the link right >> now. > > If start a new project in rails 3 beta now, and update to the stable > in the future when its released, i wouldn't have to make man

Re: [Rails] Re: Re: Re: Re: Encoding problems with Rails 3 + Ruby 1.9.1 (big surprise)

2010-07-05 Thread Conrad Taylor
On Mon, Jul 5, 2010 at 3:16 AM, Fernando Perez wrote: > Wait! > > I noticed that on my freeBSD box, the locale environment variables are > not set. > > $ locale > LANG= > LC_CTYPE="C" > LC_COLLATE="C" > LC_TIME="C" > LC_NUMERIC="C" > LC_MONETARY="C" > LC_MESSAGES="C" > LC_ALL= > > > Have you trie

  1   2   3   4   5   6   7   8   9   >