Re: [Rails] How do we get the End of Line date for the gems which we are using Ruby on Rails?

2012-10-10 Thread Jeffrey L. Taylor
Quoting Colin Law : > On 10 October 2012 10:39, RoR Uk wrote: > > Hi All, > > > > I want to know the EOL date for the below gems for ROR. Can anyone help me > > how to find the EOL dates > > What do you mean by EOL date (presumably End Of Line, but what do you > mean by that)? > End Of Life - u

Re: [Rails] How to escape a forward slash with gsub, also does interpolation work with gsub?

2012-09-30 Thread Jeffrey L. Taylor
Quoting S Ahmed : > I am trying this: > > I want to replace all the text in between java comments: > > /* start */ > replace this text here > /* end */ > > > I'm trying: > > text.gsub(//* start */(.*)/* end *//im, replace_with) > > But i'm getting errors relating to expecting keyword_end. >

Re: [Rails] Bundle Install ERROR: ERROR: Failed to build gem native extension.

2012-09-25 Thread Jeffrey L. Taylor
You need to install the BZ compression library, including it's header files, usually in libbz2-dev or libbz2-devel. HTH, Jeffrey Quoting Tak G. : > Hello, > > I'm trying to setup postgreSQL onto rails on linux and when I type > bundle install this is the error that i get. I guess its not find

Re: [Rails] Using one model's attribute in another model's method

2012-09-05 Thread Jeffrey L. Taylor
Quoting sacshu : > I'm slightly new at Rails, so any help would be appreciated! > > I have two models that have no association with each other (but they would > probably be many-to-many). One is called 'Course' and contains seed data of > Golf Courses. The other is called 'Player' and contains

Re: [Rails] RoR App - Location Search Gem/Algorithm?

2012-08-28 Thread Jeffrey L. Taylor
Quoting William Moss : > Hi guys > > Just a question... I need some advice > > I am looking to put together a RoR app to interface with an iPhone app > > The iPhone app will be like a 'find the nearest' app. When the user runs > it, it will take the user's location, send a JSON request to t

Re: [Rails] Commands of creating new app. are different.

2012-08-18 Thread Jeffrey L. Taylor
Quoting Rubyist Rohit : > I am following "Head First Rails" to learn Rails Web Application > Development. > [snipped] You need to match major versions and preferably minor version of Rails. From the snipped part of your e-mail, it's clear that "Head First Rails" was written for Rails 2, which i

Re: [Rails] Environments

2012-05-31 Thread Jeffrey L. Taylor
Quoting BeagleBen : > Hello all > > I am returning to rails after a moving in with asp.net mvc for a while, I > have setup rails on a centos server with passenger, I have set the rails > environment as production within my httpd config, when I do rake about it > show the environment as developm

Re: [Rails] rails block in js.erb ?

2012-05-29 Thread Jeffrey L. Taylor
Quoting Erwin : > I am trying to run a bloc in a js.erb script , but I don't get ir ... > debugger show that the test is true, so it should run .. > > <% if (params[:blog_page].to_i > 0) do %> > >alert("should redisplay the dashboard page"); >window.location.href = <%= backoffice_url %>;

Re: [Rails] error in "each" method in following code.

2012-05-26 Thread Jeffrey L. Taylor
Cut it down to the minimun necessary to show the problem. There are several each calls here. Jeffrey Quoting Prajwal B. : > require 'rubygems' > require 'nokogiri' > require 'sqlite3' > > FIELD_NAMES = [['selectcity', 'VARCHAR'],['match', 'VARCHAR'], > ['phone_no', 'NUMERIC'], ['name', 'VARCHAR

Re: [Rails] rake error

2012-05-24 Thread Jeffrey L. Taylor
Quoting Meow san : > /usr/bin/rake:9:in `require': no such file to load -- rubygems > (LoadError) > from /usr/bin/rake:9 > > I got this error when following an online guide in rails, the command > I had to type in was # rake db:create.. after I typed in the command I > got the above error.

Re: [Rails] Upgrading to Rails 3

2012-04-08 Thread Jeffrey L. Taylor
Quoting Gurdipe Dosanjh : > Hi All, > > Thanks to everyone for the great updates on how to upgrade to Rails 3. > > What are the technical and business benefits of upgrading to the latest > versions of Ruby an Ruby on Rails. > > The application we have written is still on Ruby version 1.8.7 and R

Re: [Rails] Agile Web Development 4th ed. - Can't mass assign.error

2012-04-07 Thread Jeffrey L. Taylor
Quoting Lucas J. : > I am new to Ruby and to Rails (using Ruby 1.9.3 and Rails 3.2.3) so I > picked up the Agile Web Development book and have been working through > it (apologies if this isn't the correct place for this question but the > pragprog forums don't seem to work for me). I am currently

Re: [Rails] Re: Upgrading to Rails 3

2012-04-07 Thread Jeffrey L. Taylor
Quoting Gurdipe Dosanjh : > Hi All, > > Re: Upgrading to Rails 3 > > I am working on a rails application I need to upgrade to the latest version > of Ruby and Ruby on Rails. > > It is currently using: > > Ruby version 1.8.7 and > Ruby on Rails version 2.3.5 > > Is there any information, tutor

Re: [Rails] Re: Pessimistic locking locks the entire table?

2012-04-04 Thread Jeffrey L. Taylor
This is similar to a application I am working on. In my case, all updates to the database, with one exception, can be done atomically. For examples, use SQL UPDATE to increment a field rather than read with pure Rails/ActiveRecord, increment model instance, and write. The one exception is adding

Re: [Rails] Invoking one controller's methods from other controller

2012-04-02 Thread Jeffrey L. Taylor
Quoting Pallav_bfs : > I have a controller (employee) with it's model and view. Now I need to > write another controller (emp) which would not have any model or view. > This emp controller should be able to invoke all the methods of > employee controller.And eventually be able to represent all the

Re: [Rails] paginate a table

2012-03-17 Thread Jeffrey L. Taylor
Quoting Rogelio A. RogeX : > Hi, I am try paginate a table with plugin WillPaginate, but according to > me I can only paginate as following: > > //make a query, > data = Model.paginate(:per_page => 5).. > > //Show paginate > <%= WillPaginate @data% > > And I need paginate so: > > obj1 = Mo

Re: [Rails] 110.years.ago.to_datetime returns wrong date

2012-03-14 Thread Jeffrey L. Taylor
Quoting John Merlino : > > I run this in console: > > >> 110.years.ago.to_datetime > => Fri, 14 Mar 1902 01:20:12 + > > Today is the 13th of march. So why is it returning 14th? > Time zones. Notice the + at the end. You are in the Pacific time zone according to the headers in your e-

Re: [Rails] SOT: HTML question about clickable area

2012-02-27 Thread Jeffrey L. Taylor
Quoting Dev Guy : > On Sun, Feb 26, 2012 at 9:08 PM, Jeffrey L. Taylor > wrote: > > On the development version of my Web app, the clickable area of some anchors > > is the text area and the padding (margin and border are both zero).  On the > > production version, only

[Rails] SOT: HTML question about clickable area

2012-02-26 Thread Jeffrey L. Taylor
On the development version of my Web app, the clickable area of some anchors is the text area and the padding (margin and border are both zero). On the production version, only the padding is clickable. Any hints on how to track down the difference that makes a difference would be appreciated. T

Re: [Rails] Query on db with mysql

2012-02-25 Thread Jeffrey L. Taylor
Quoting Paul Na : > Hi all, > > > I have a host that allows ssh access but only on the main account. I was > just wondering can you setup the db without using the command line e.g > db:migrate generate etc as on my main account its fine but if i setup > other sites i will have to pay $10/£6 to ac

Re: [Rails] Issues with template encoding (invalid byte sequence in UTF-8):

2012-02-23 Thread Jeffrey L. Taylor
The template is likely UTF-8, but the information from the database, e.g. entry[:original_url] is likely ASCII-8BIT if you are using MySQL and the mysql adapter, assuming your tables are UTF-8. Try using the mysql2 adapter instead. IIRC, install the mysql2 gem and change all 'adapter: mysql' in c

Re: [Rails] Re: Re: Re: Encoding error

2012-02-08 Thread Jeffrey L. Taylor
Quoting Felipe Pieretti Umpierre : > Jeffrey L. Taylor wrote in post #1044767: > > Quoting Felipe Pieretti Umpierre : > >> > Regards, > >> > Everaldo > >> > > >> > On Tue, Feb 7, 2012 at 9:10 PM, Felipe Pieretti Umpierre < > >

Re: [Rails] Re: Re: Encoding error

2012-02-08 Thread Jeffrey L. Taylor
Quoting Felipe Pieretti Umpierre : > Everaldo Gomes wrote in post #1044692: > > Hi! > > > > Try to follow Jefrey tip. Because he said that mysql adapter returns > > ASCII-8bit. > > > > You must use > > > > adapter: mysql2 > > > > Regards, > > Everaldo > > > > On Tue, Feb 7, 2012 at 9:10 PM, Felipe

Re: [Rails] Encoding error

2012-02-06 Thread Jeffrey L. Taylor
Quoting Felipe Pieretti Umpierre : > Hello, I have in my db a register what have special characters, and when > I try to put on my form to edit this values, this happens: > > incompatible character encodings: UTF-8 and ASCII-8BIT > > Extracted source (around line #4): > > 1: <%= form_for :group,

Re: [Rails] Application speed up issue

2012-02-03 Thread Jeffrey L. Taylor
Quoting Srimanta Chakraborty : > Hi, > I have a controller action which is taking 10 seconds to run. Most of > the time is being spent in a view which is a large file.(more than 1500 > lines). How shall I go about debugging the speed issue? > Profile it. See which methods are being called, how

Re: [Rails] (SOT) Change in em-http-request: 0.3.0 => 1.0.0

2011-12-17 Thread Jeffrey L. Taylor
Quoting Jeffrey L. Taylor : > I am trying to bring some older code up to date. It works fine with > em-request-http 0.3.0. With 1.0.0 it breaks, revealing my lack of > understanding Ruby, among other things. The following code reveals the > problem: > > require &#

[Rails] (SOT) Change in em-http-request: 0.3.0 => 1.0.0

2011-12-17 Thread Jeffrey L. Taylor
I am trying to bring some older code up to date. It works fine with em-request-http 0.3.0. With 1.0.0 it breaks, revealing my lack of understanding Ruby, among other things. The following code reveals the problem: require 'rubygems' require 'eventmachine' #gem 'em-http-request', '=0.3.0' requir

Re: [Rails] install pauldix-feedzilla

2011-12-16 Thread Jeffrey L. Taylor
Quoting guru : > urjit@dharin02:~/rails_project/demo1$ sudo gem install pauldix- > feedzirra > [sudo] password for urjit: > ERROR: Could not find a valid gem 'pauldix-feedzirra' (>= 0) in any > repository > ERROR: Possible alternatives: agiley-feedzirra, fblee-feedzirra, > orend-feedzirra, penso-

Re: [Rails] Lots of embedded ruby / database queries on a page

2011-11-25 Thread Jeffrey L. Taylor
Quoting Andrew Brown : > I have a few questions about how well RoR performs under various > 'irregular' circumstances. First, how quickly does rails work when > there are potentially lots of embedded ruby expressions (hundreds) per > page? Also, how well does ruby do when there are perhaps hundre

Re: [Rails] apostrophes

2011-11-05 Thread Jeffrey L. Taylor
Quoting Mlle : > My database is in utf8 but apostrophes are showing up as ’ in my > templates. How can I fix this? > Are your Web pages (probably in layouts) set to UTF-8? For example, it there a line like this in the header? HTH, Jeffrey -- You received this message because you a

Re: [Rails] Re: exception handling not working?

2011-10-25 Thread Jeffrey L. Taylor
Plain "rescue" just catches exceptions derived from the StandardError class. IIRC, "rescue Exception" will catch everything. HTH, Jeffrey Quoting Rajinder Yadav : > OK I figured out this is a bug with webbrick, it errors out and then > crashes! > > I installed passenger + nginx and the code wo

Re: [Rails] Delete all cache

2011-10-25 Thread Jeffrey L. Taylor
Quoting Luk Mus : > Is it possible to delete all rails cache? how? > 'rake tmp:clear' doesn't work. > > config/envinroments/production.rb: > ... > config.cache_store =:file_store, 'tmp/cache/' > ... > Try restarting the Rails server, Webrick, Apache, whatever. HTH, Jeffrey -- You received t

Re: [Rails] Looking for a Rails book for a Ruby programmer

2011-10-08 Thread Jeffrey L. Taylor
Quoting Mateusz W. : > Hey guys, > > I want to learn Ruby on Rails. I have quite a bit of Ruby experience, > I've been programming in it full time for the past few months. I've been > looking for a book that would give me a good overview of Rails, but that > doesn't go into Ruby specifics. Somethi

Re: [Rails] undefined method `options' for #

2011-09-26 Thread Jeffrey L. Taylor
Quoting Anait M. : > Hi , I am writing a rake task to consume twitter stream API. The task > contains the following code: > > consumer = OAuth::Consumer.new(CONSUMER_KEY, CONSUMER_SECRET, :site => > 'http://twitter.com') > access_token = > OAuth::AccessToken.new(consumer,ACCESS_TOKEN,ACCESS_TOKEN_

Re: [Rails] Can't upgrade Rails - Failed to build gem native extension.

2011-09-05 Thread Jeffrey L. Taylor
Quoting jay@oz : > I am new to Rails and attempting to upgrade Rails on my Mac to latest > version so that I can follow the rails tutorial, but I just can't seem > to get anywhere. > > When I attempt to update rails with: $ sudo gem update rails -y, I > receive the following error. > > ERROR: Er

Re: [Rails] Re: Weird assignment problem, very confused :(

2011-08-29 Thread Jeffrey L. Taylor
Quoting sol : > This is really weird, either a bug (it's 3.1 rc5) or I don't know: > > 1) DocType.create(:name => request.remote_ip) > DocType.find_by_name('127.0.0.1') > DocType Load (1.4ms) SELECT "doc_types".* FROM "doc_types" WHERE > "doc_types"."name" = '127.0.0.1' LIMIT 1 > => nil >

Re: [Rails] [haml] simple question that would make my life a lot better

2011-08-29 Thread Jeffrey L. Taylor
Quoting Commander Johnson : > Hello, > > In HAML, is it possible to get this result: > > - link_to "http://www.example.com"; do > - "www" > - "example" > - "com" > What about: - link_to "http://www.example.com"; do - ["www", "example", "com"] Jeffrey -- You received this message be

Re: [Rails] Use find with a variable

2011-08-25 Thread Jeffrey L. Taylor
Quoting Leonel *.* : > I got the id of a "part" in variable "the_id". In a partial > "_order_fields.html.erb" > > So I do this... > @a = Part.find(the_id) > > I get this error... > Couldn't find Part without an ID > Uhh, are you sure the_id has a numeric value at that point in the view? You do

Re: [Rails] Re: Long polling (comet) on Rails

2011-08-15 Thread Jeffrey L. Taylor
Quoting Yaroslav Govorunov : > On Aug 14, 1:52 pm, Frederick Cheung > wrote: > > On Aug 11, 12:27 pm, "Yaroslav G." wrote: [snip] > Spreading nodes completely depends on a backend used to store and pass > messages - whether it would be RabbitMQ, database, etc. We only added > non blocking eventma

Re: [Rails] Javascript/Ajax questions for rails applications

2011-05-15 Thread Jeffrey L. Taylor
Quoting egervari : > I am loving just about everything in rails right now. I find a lot of > things faster than java and it's a pleasure to work with. > > One area though that I am not sure how to proceed with is ajax/ > javascript. > > For those of you using rails and a lot of ajax, what are you

Re: [Rails] Re: each do js problem

2011-05-10 Thread Jeffrey L. Taylor
Quoting Colin Law : > On 10 May 2011 17:56, Neil Bye wrote: > > Frederick Cheung wrote in post #997768: > > > >> Is this repeated for each comment? have multiple things on the page > >> with the same id is a no-no: ids should be unique > >> > >> Fred > > > > > > This is the full code > > > > <% @u

[Rails] How to handle orphans?

2011-05-08 Thread Jeffrey L. Taylor
The requirements for my Web app have changed and now instead of destroying an object and all children when it expires, I need to destroy the parent object when the last child is destroyed. Is there a builtin or gem to do this? Is it better to check the cached count in the parent (reference counti

Re: [Rails] Beginners question | moving a method from controller to model

2011-05-08 Thread Jeffrey L. Taylor
See inserted comments below. Quoting linda Keating : > I'm learning with the Agile Web Development 4th edition book. I've > built a method in my controller to test that it works, and now I want to > move it to the model. > > *** line_item controller *** >

Re: [Rails] Re: Out of order Ajax responses

2011-05-05 Thread Jeffrey L. Taylor
Quoting Ramon Leon : > On 05/05/2011 08:41 AM, Jeffrey L. Taylor wrote: > >function replace_article(id, action) { > > obj = $j('#article_'+id); > > jQuery.ajax({url: '/articles/'+action+'/'+id, type: 'POST', > >

Re: [Rails] Re: Out of order Ajax responses

2011-05-05 Thread Jeffrey L. Taylor
Quoting Frederick Cheung : > > > On May 5, 4:20 pm, "Jeffrey L. Taylor" wrote: > > I have several links on my Website that make Ajax calls and replace an div > > with the response.  If I click several of these links quickly, it looks like > > the responses

[Rails] Out of order Ajax responses

2011-05-05 Thread Jeffrey L. Taylor
I have several links on my Website that make Ajax calls and replace an div with the response. If I click several of these links quickly, it looks like the responses may replace the wrong div. Response times of the server can vary wildly, so responses may arrive out of order. Is there a solution

Re: [Rails] Testing download in controller

2011-04-30 Thread Jeffrey L. Taylor
Quoting David Kahn : > On Sat, Apr 30, 2011 at 8:14 AM, Jeffrey L. Taylor > wrote: > > > How can download of files be tested? The processing of the file is being > > tested okay, but I don't know how to simulate the controller call. > > > > What are you

[Rails] Testing download in controller

2011-04-30 Thread Jeffrey L. Taylor
How can download of files be tested? The processing of the file is being tested okay, but I don't know how to simulate the controller call. TIA, Jeffrey -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email

Re: [Rails] Re: Question about ERB performance

2011-04-13 Thread Jeffrey L. Taylor
For that level of detail, profiling is probably the way to go. Google "rails profiling" for your options. Jeffrey Quoting egervari : > Oh, I see. Is there any way I can find out how long it's taking to > make the objects? Make an isolated script that does the same thing and > not call into erb a

Re: [Rails] How to achieve Google Reader-like layout in Rails?

2011-04-06 Thread Jeffrey L. Taylor
Quoting Arve Knudsen : > Hi > > I'm trying to create a web application with a UI that is fundamentally > similar to Google Reader, in Rails 3 and probably with some Javascript > toolkit (jQuery?). I'm new to web development (my background is in desktop > application development), however, and afte

Re: [Rails] Can i upgrade a project from rails 1.2.3 to rails 3.0.5 ?

2011-04-06 Thread Jeffrey L. Taylor
Quoting nishant : > hello, > i have an application which is created in rails 1.2.3 and ruby 1.8.6 > and now i have to upgrade it to rails 3.0.5 and ruby 1.8.7 ? is it > possible? and if yes how ?? can you guys provide me with some kind of > link or reference . > If it were my project, I'd upgrad

Re: [Rails] Re: Different GET response w/ wget and w/ em-http-request

2011-04-03 Thread Jeffrey L. Taylor
Quoting Frederick Cheung : > > > On Apr 3, 5:26 am, "Jeffrey L. Taylor" wrote: > > I am trying to fetchhttp://drdobbs.com/rss/all.  With wget or Firefox, works > > fine.  With em-request-http, the server redirects to a login page - 302 > > status > >

[Rails] Different GET response w/ wget and w/ em-http-request

2011-04-02 Thread Jeffrey L. Taylor
I am trying to fetch http://drdobbs.com/rss/all. With wget or Firefox, works fine. With em-request-http, the server redirects to a login page - 302 status code, HTML response and response LOCATION header set to https://login.techweb.com:443/cas/login?service=http%3A%2F%2Fdrdob +bs.com%2Frss%2Fal

Re: [Rails] can i switch to rails 2.3.5 and run a rails 2.3.5 code??

2011-03-31 Thread Jeffrey L. Taylor
Quoting Rajesh B. : > Hi all, > > i have installed rails 3 using RVM . the prob is now i have two parallel > projects where one is in 2.3.5 and another is in rails3. > [snip] Look in config/environment.rb for a line like this, or add it if necessary: # Specifies gem version of Rails to use whe

Re: [Rails] Problems with Object#id deprecation

2011-03-16 Thread Jeffrey L. Taylor
Quoting Rodrigo Alves Vieira : > Hello everyone, in a test helper in my app I call category.id that gets the > id of category in the database. However, when running RSpec I get the > following error: > > As a parla customer > /Users/saulolopes/code/parla/spec/acceptance/support/paths.rb:13: wa

Re: [Rails] Parslet & Stack size

2011-03-10 Thread Jeffrey L. Taylor
Quoting PsiPro : > Hello all, > > I am using parslet to do some log-file parsing and have run into the > "stack level too deep" error, and I am only half-way though with > writing the rules for a single line to be parsed. > I don't know the specific technology in Parslet, but if it's a typical r

Re: [Rails] Problem with render_component and rails 3

2011-02-28 Thread Jeffrey L. Taylor
Quoting Ricardo Gonçalves Dias : > I have a application that it use view/layout/application.rhtml, in > this file I have: > > <%= render_component :controller => 'car', :action =>'index'%> > > But there is one problem, it display this problem: undefined method > `render_component' for #<#:0xb67e5

Re: [Rails] Re: I am lost .. why this simple code is running well with irb and not in my app... (syntax error)

2011-02-24 Thread Jeffrey L. Taylor
Quoting Erwin : > I forgot to mention I write in Ruby 1.9.2... but whatever > I should have the same error running irb ... > I replaced this line with a do block and it's running fine ... Did > Einstein said : "Ruby don't play dice" ? > Ah, but God did give electrons a bit of freewill. Ruby in

[Rails] Rails 2.3.11 and I18N question

2011-02-23 Thread Jeffrey L. Taylor
Due to slightly different Gems on the development and the production machines, I've discovered that Rails 2.3.11 has I18N support in ActiveSupport. Any recommendations on whether to use the i18n gem (currently using 0.5.0) or the I18N support in ActiveSupport (apparently 0.4.1)? TIA, Jeffrey -

Re: [Rails] caching database result

2011-02-21 Thread Jeffrey L. Taylor
Quoting Vogon Primo : > Hi guys, > Has ActiveRecord 3 a more complex cache mechanism than version released > with Ruby on Rails 2.0 ? > > And has ActiveRecord the concept of "scope of object identity?" > > obj1 = MyModel.find(1) > obj2 = MyModel.find(1) > > results in two selects and two diff

Re: [Rails] Re: can you portably store infinity via AR?

2011-02-10 Thread Jeffrey L. Taylor
Quoting Frederick Cheung : > > On 10 Feb 2011, at 20:20, Robert Walker wrote: > > > Fearless Fool wrote in post #980885: > >> The gist of my question: is there a way to *portably* store and retrieve > >> Infinity in an ActiveRecord float column? > > > > Okay, first some clarifications: > > > >

Re: [Rails] RedCloth

2011-02-09 Thread Jeffrey L. Taylor
Quoting rails.impaired : > RedCloth (4.2.6) was installed via: sudo gem install RedCloth > ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] > running Ubuntu 10.10 > > No errors during the install > > any ideas?? > > irb(main):001:0> require 'rubygems' > => true > irb(main):002:0> require

Re: [Rails] rails hoster recommendation

2011-02-05 Thread Jeffrey L. Taylor
Quoting frankblizzard : [snip] > i am in germany, so probably a european hoster would be preferred. > thanks for your help > Also worth asking is where are your customers. Near to me, convenient. Near to customers, good service. Jeffrey -- You received this message because you are subscribed

Re: [Rails] libxml-ruby sax parsing open-uri

2011-01-22 Thread Jeffrey L. Taylor
Quoting Chris Armstrong : > Hi there, > > I need to connect to an url to download and process an XML document. > Then run through the XML document and save elements in the database. > > There are many howto's on the internet regarding parsing xml files with > SAX opening a file on the filesystem

Re: [Rails] Re: Scheduled tasks on rails

2011-01-13 Thread Jeffrey L. Taylor
Quoting Walter Lee Davis : > > On Jan 13, 2011, at 12:36 PM, Donald R. Ziesig wrote: > > >I restrict the ip to 0.0.0.0 (localhost) so no one outside the > >server can use the route. If someone is able to hack into the > >server itself, all bets are off. :-( . So far I haven't had any > >problem

Re: [Rails] Re: ActiveRecord::StatementInvalid

2011-01-13 Thread Jeffrey L. Taylor
Quoting Tom Mac : > > but in terms of getting your > > application running can you not just truncate the string to a valid > > length before saving the record? > > Yes that is possible any way not the best. Relating to this two > questions. > 1) Is there any other gem than mysql. I found rub

Re: [Rails] Re: Scheduled tasks on rails

2011-01-12 Thread Jeffrey L. Taylor
Quoting Owain : > > > > Look at local_request? method in ActionController. > > > > Jeffrey, > > Certainly another option but I would prefer not to have "network > config" logic in my application if I can help it. If you want to > manage all of the housekeeping jobs from a remote curl or put in l

Re: [Rails] Re: Scheduled tasks on rails

2011-01-12 Thread Jeffrey L. Taylor
Quoting Owain : > > > On Jan 12, 2:54 pm, "Donald R. Ziesig" wrote: > >   Douglas, > > > > I have been using cron tasks that invoke curl that invokes the routes > > that perform the periodic tasks for several years. > > Do you wrap some security on those routes at the web-server level or > in t

Re: [Rails] undefined local variable or method?

2010-12-25 Thread Jeffrey L. Taylor
Quoting Mauro : > On 26 December 2010 00:35, Jeffrey L. Taylor wrote: > > Quoting Mauro : > >> I have: > >> <%= form_for(@supplier) do |f| %> > >> ... > >> .. > >> <%= render 'sector_categories'

Re: [Rails] undefined local variable or method?

2010-12-25 Thread Jeffrey L. Taylor
Quoting Mauro : > On 26 December 2010 00:35, Jeffrey L. Taylor wrote: > > Quoting Mauro : > >> I have: > >> <%= form_for(@supplier) do |f| %> > >> ... > >> .. > >> <%= render 'sector_categories'

Re: [Rails] undefined local variable or method?

2010-12-25 Thread Jeffrey L. Taylor
Quoting Mauro : > I have: > <%= form_for(@supplier) do |f| %> > ... > .. > <%= render 'sector_categories', :locals => {:f => f} %> > > in _sector_categories partial I have: > > > > <% for category in @categories %> > <%= f.check_box :category_ids[], category.id, > @supplier.

Re: [Rails] Re: `require': no such file to load -- activerecord

2010-12-11 Thread Jeffrey L. Taylor
Look at the stack dump. One of the Gems or plug-ins is requiring the file. Jeffrey Quoting Mike C : > Thanks for the response! I don't manually include active record > anywhere, so how can I fix this? > > On Dec 11, 10:57 am, "Jeffrey L. Taylor" > wrote: >

Re: [Rails] `require': no such file to load -- activerecord

2010-12-11 Thread Jeffrey L. Taylor
Quoting Mike C : > I'm trying to upgrade my Rails 2.3.5 app to Rails 3, and when I try > and start the rails server with 'rails s' I get this: > > /Library/Ruby/Gems/1.8/gems/activesupport-3.0.3/lib/active_support/ > dependencies.rb:239:in `require': no such file to load -- activerecord > (LoadErr

Re: [Rails] rails float type number does not work right

2010-12-05 Thread Jeffrey L. Taylor
Quoting 蕲春人 : > it "should get right settlement percent" do > contract = Contract.new > contract.settlement_percent = 1.1 / 100.0 > contract.settlement_percent.to_f.should == 0.011 > contract.settlement_percent.to_s.should == "0.011" > end > > but test result is : >

Re: [Rails] will_paginate on enormous tables

2010-11-24 Thread Jeffrey L. Taylor
Quoting Aldo Italo : > I'm using the plugin will_paginate with a table of more than 100,000 > records, i also do a join with other table. > I'm wondering if will_pagination in my situation is an appropriate > choice, or whether it is better to implement something ad-hoc? > Large joins are generall

Re: [Rails] When was callback registration introduced?

2010-11-08 Thread Jeffrey L. Taylor
Never mind, bitten by fixtures. They aren't created normally and the callbacks aren't called. Jeffrey Quoting Jeffrey L. Taylor : > I'm using Rails 2.3.5 and finding that for lines like these below in a model, > the block is never executed. Am I doing something wrong or

[Rails] When was callback registration introduced?

2010-11-08 Thread Jeffrey L. Taylor
I'm using Rails 2.3.5 and finding that for lines like these below in a model, the block is never executed. Am I doing something wrong or was this introduced in a later version of Rails? before_create :preprocess_score def preprocess_score puts "HERE: #{__LINE__}" self['score'] = Toke

Re: [Rails] Optimization on huge generating xml?

2010-11-08 Thread Jeffrey L. Taylor
Quoting Samnang : > Hi all, > > Currently, I'm developing a rails app that are heavy generating xml > from restful webservice. My xml representation of web service use > nokogiri gem to generates xml format that match expected format from > client. But the problem is data is quite big around 50, 0

Re: [Rails] Re: Re: SOT MySQL index question

2010-11-07 Thread Jeffrey L. Taylor
Quoting Marnen Laibow-Koser : > Jeffrey L. Taylor wrote in post #959191: > > Quoting Marnen Laibow-Koser : > >> Jeffrey L. Taylor wrote in post #958953: > >> > How should I index the terms table for maximum speed? > >> > >> How can we tell

Re: [Rails] Re: SOT MySQL index question

2010-11-03 Thread Jeffrey L. Taylor
Quoting Marnen Laibow-Koser : > Jeffrey L. Taylor wrote in post #958953: > > How should I index the terms table for maximum speed? > > How can we tell you? You neglected to say how you're using that > table...or is the query below the only one you're interested in?

Re: [Rails] How do I make an email system that works for my site?

2010-11-03 Thread Jeffrey L. Taylor
Quoting Mr Mody : > I want to build an app where users can send emails within the site, as > well to a client like gmail. Sort of how myspace.com sends emails > within its self, As well as gmail. Is there a book that explains how to > do both? > The answer depends enormously on what the operating

[Rails] SOT MySQL index question

2010-11-03 Thread Jeffrey L. Taylor
How should I index the terms table for maximum speed? It doesn't have to be Rails migration doable. E.g. a primary key of (user_id, article_id, fnv) is okay. fnv is a 63 bit Fowler-Noll-Vo hash. def self.neighbors(user_id, article_id) sql = "SELECT t1.article_id, SUM(t1.freq * t2.freq) A

Re: [Rails] Start mongrel in ssh session and then exit in Ubuntu 10.04

2010-10-06 Thread Jeffrey L. Taylor
Quoting Duy Lam : > Hi all, > > I'm deploying a Rails application in a Ubuntu 10.04 server with > mongrel web server. I connect to server and do stuffs in a ssh client > (PuTTY). And I'm getting stuck with a strange issue: > 1. After I connected to server, I start mongrel with : $ start-stop- > da

Re: [Rails] rake and stderr

2010-10-05 Thread Jeffrey L. Taylor
Quoting Jonathan Rochkind : > Why can't I get a rake task to write to stderr? > > warn "something" > $stderr.puts "something" > What about: STDERR.puts "something" HTH, Jeffrey -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To pos

Re: [Rails] Re: http caching a dynamic page

2010-10-04 Thread Jeffrey L. Taylor
lling the > browser load the entire page for that action from cache. > > Don't most apps similar structure (a username at the top, may be a > badge or something that is specific to a logged in user), how would > you etag these kind of pages? > > > > On Oct 4, 5:05 

Re: [Rails] http caching a dynamic page

2010-10-04 Thread Jeffrey L. Taylor
Quoting badnaam : > Is it possible to take advantage of http caching/proxy caching with > dynamic pages? i.e. pages with section/part that can change over time > but certain part of the page remain the same. I would rather not keep > re-rendering the static part but insure the dynamic part are rend

Re: [Rails] Re: Re: Re: Re: Authlogic Rails 3

2010-09-13 Thread Jeffrey L. Taylor
Quoting Paul Mr : > Paul Mr wrote: > > Rick R wrote: > >> On Sun, Sep 12, 2010 at 10:14 PM, Paul Mr wrote: > > > > thats what Im betting on. > > Pretty much.. that one creates all the models/scaffolds/controllers the > usual way...not even caring about Authlogic::Session::Base > > though I ass

Re: [Rails] schedule to run a method?

2010-09-10 Thread Jeffrey L. Taylor
Quoting Ichiro Saga : > Hi, everyone. I wrote a ror app. One of the methods in controller > extracts data from files and saves it to database. Because there are > many new files every night, is it possible to run this method only every > night or every other night? Thanks in advance. > Simplest

Re: [Rails] Will a Quad-core i5 processor significantly speed up development on Linux or Mac?

2010-09-10 Thread Jeffrey L. Taylor
Quoting BlueHandTalking : > I am looking at getting a new Thinkpad with an i5 processor. > > I was curious to what extent this would speed up developing a Ruby on > Rails > app. I am guessing that this depends to what extent multi-threading is > utilized, > but I am not sure---hence the question :

Re: [Rails] Re: Freeze an attribute?

2010-09-09 Thread Jeffrey L. Taylor
Quoting Frederick Cheung : > > > On Sep 9, 2:11 am, "Jeffrey L. Taylor" wrote: > > Is it possible to to freeze a single attribute of an ActiveRecord (Rails > > 2.3.5).  Hopefully in a way that isn't deprecated in 2.3.8 or 3.0. > > > attr_readonly ?

[Rails] Freeze an attribute?

2010-09-08 Thread Jeffrey L. Taylor
Is it possible to to freeze a single attribute of an ActiveRecord (Rails 2.3.5). Hopefully in a way that isn't deprecated in 2.3.8 or 3.0. TIA, Jeffrey -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email

Re: [Rails] Re: unable to upload larger files

2010-09-07 Thread Jeffrey L. Taylor
Quoting Amit Tomar : > Jeffrey L. Taylor wrote: > > Quoting Amit Tomar : > >> hii, > >> i am trying to upload some files to filesystem using rails application > >> when i use small size file everything is perfect but i when goes for > >>

Re: [Rails] unable to upload larger files

2010-09-07 Thread Jeffrey L. Taylor
Quoting Amit Tomar : > hii, > i am trying to upload some files to filesystem using rails application > when i use small size file everything is perfect but i when goes for > larger files i got error > this is my code > Check the Webserver's (e.g. Apache) file size limit. It may be set to some sm

Re: [Rails] invalid byte sequence in UTF-8 , need to re-encode ?

2010-09-06 Thread Jeffrey L. Taylor
Quoting Erwin : > > > I have a string coming from an email body : > (rdb:1) body > "\r\nLe 3 sept. 2010 \340 19:06, Event Seve Test a \351crit :\r\n\r\n> > Please answer the question by writing an X at the chosen places :\r\n> > \r\n> are you coming : \r\n> \r\n> YES: X\r\n> \r\n> NO:_\r\n>

Re: [Rails] Re: Rails 3 install on Ruby Enterprise

2010-09-06 Thread Jeffrey L. Taylor
Quoting Charlie B99 : > Veera Sundaravel wrote: > > May be this link will help you. > > http://veerasundaravel.wordpress.com/2010/02/15/rails3-beta-installation/ > > > > > Still receive error installing rails: active model requires i18n > When I try to sudo gem install i18n, it errors out becaus

Re: [Rails] Re: Removing just leading and trailing newline characters

2010-08-19 Thread Jeffrey L. Taylor
Quoting Marnen Laibow-Koser : > Priya Saini wrote: > > Hi: > > > > I am using FCKeditor in one of my form, when i copy and paste something > > into it using WordPaste, it appends few newlines at the beginning and at > > the end. > > How can i strip just those \n without effecting the inbetween new

Re: [Rails] Re: Ruby question, max length of strings

2010-08-19 Thread Jeffrey L. Taylor
Quoting Paul Harrington : > Paul Harrington wrote: > > Jeffrey L. Taylor wrote: > >> Am I correct in assuming that the max length of a string is 65,535 on a > >> 32 bit > >> platform? Anyway around this, other classes, 64 bit platform? > >> > >

[Rails] Ruby question, max length of strings

2010-08-18 Thread Jeffrey L. Taylor
Am I correct in assuming that the max length of a string is 65,535 on a 32 bit platform? Anyway around this, other classes, 64 bit platform? TIA, Jeffrey -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send emai

Re: [Rails] save! neither saves nor raises error

2010-08-18 Thread Jeffrey L. Taylor
Quoting Fearless Fool : > I don't like this. This makes me grumpy, and I've even already had my > morning coffee. > > obs[0] is a PremiseObservation, save! completed without error, yet > nothing was written to the db. This is a serious ass-biter: > > irb(main):057:0> PremiseObservation.count >

Re: [Rails] Search large XML file -- REXML slower than a slug, regex instantaneous

2010-08-05 Thread Jeffrey L. Taylor
Quoting David Kahn : > Got a question hopefully someone can answer - > > I am working on functionality to match on certain nodes of a largish (65mb) > xml file. I implemented this with REXML and was 2 minutes and counting > before I killed the process. After this, I just opened the console and > l

  1   2   3   4   >