[Rails] Re: /lib/rack/request.rb in my gem - is this reserved?

2010-04-27 Thread kb
Hi Fred, thanks for your response! Can you give me some hints where I can read more absout filenames which I should avoid? Or how to determine such a thing. This was a pain for a couple of hours to find out! Regards, Klaus On 26 Apr., 11:09, Frederick Cheung frederick.che...@gmail.com wrote:

[Rails] Re: Ubuntu Linux Editor / Prettiefier

2010-04-27 Thread tonypm
1) Move the cursor to the start of the text you want to select. 2) Set a starting mark using Ctrl + Space. 3) Move the cursor to the end of the text you want to select. 4) Copy the text using Alt + w, or cut the text using Ctrl + w. 5) Move the cursor to wherever. 6) Ctrl + y to paste.

[Rails] Re: Ubuntu Linux Editor / Prettiefier

2010-04-27 Thread tonypm
I switch buffers using the arrow keys most of the time. Ctrl + x, and then left or right arrow. Thanks that helps (I notice you can also left and right click on the buffer name in the status bar) Tonypm -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Ubuntu Linux Editor / Prettiefier

2010-04-27 Thread tonypm
Marnen Thanks for your comments Ah, good point.  Emacs is my favorite console editor, but I'm not all that crazy about the graphical versions I've tried. Actually, I use Fedora, and installed the gnome version of emacs, so I do have the graphical console, but your comment about learning the

Re: [Rails] UBUNTU 10.04 and rails?

2010-04-27 Thread Pablo Torres N.
On Mon, Apr 26, 2010 at 17:54, David Zhu dzwestwindso...@gmail.com wrote: Also, do i lose all my database tables, files, ruby, rails, etc if i update? Thanks Upgrading your operating system is non-destructive - that means no, you don't. -- Pablo -- You received this message because you are

[Rails] Picasa on a rails application

2010-04-27 Thread swetha
Hi friends, I have a requirement to import picasa photos into rails application. (Similar to the option import from picasa in orkut). Do we have any plugin's to access picasa pictures. Help needed.Thankyou. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Translated (language-aware) routes in Rails application

2010-04-27 Thread Paweł K
Hi, I'd like to have translated languate-aware routes in my application, like: /projects/5/permissions = locale PL /projekty/5/pozwolenia = locale PL Is there any way to achieve it with RESTful routes? I have done it manually with named routes, but it's overwhelming with over 300 routes :D Also

[Rails] Re: ruby:0:in `require': no such file to load -- oci8 (LoadError)

2010-04-27 Thread Frederick Cheung
On 26 Apr, 23:45, kimda tkk...@gmail.com wrote: When I said require rubygems I meant that you need to do -rrubygems as well as -roci8 hm..I am confusing. do you mean updating gems? If so, I just did and still get same error. That's not what I mean. I mean that if oci8 is a gem then ruby

[Rails] Re: Ubuntu Linux Editor / Prettiefier

2010-04-27 Thread mgutz
Definitely recommend Vim if you have the patience and time to learn it. (you will get frustrated at first) I use it on Windows, Linux and OS X. In addition to the excellent plugins below, these are pretty good too: Command-T SnipMate On Apr 19, 1:24 pm, oren orengo...@gmail.com wrote: vim +

[Rails] Re: exception handling

2010-04-27 Thread Amal Kumar
Hi, In application controller rescue_from ActiveRecord::RecordNotFound,ActionController::RoutingError, ActionController::UnknownController, ActionController::UnknownAction, ::NoMethodError, :with = :handle_exception # To handle Exceptions def handle_exception

Re: [Rails] Translated (language-aware) routes in Rails application

2010-04-27 Thread Raul Murciano
You may find useful my translate_routes plugin: http://github.com/raul/translate_routes -- Raul Murciano Freelance Web Developer - http://raul.murciano.net Ruby/Rails Trainer Consultant - http://prorubyteam.com On Tue, Apr 27, 2010 at 9:27 AM, Paweł K komr...@gmail.com wrote: Hi,

[Rails] Re: woriking under webrick but not under passenger

2010-04-27 Thread Nenad Cuturic
Just want to add appache log: [error] [client 192.168.1.101] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. LogLevel debug didn't produce any

[Rails] Re: Translated (language-aware) routes in Rails application

2010-04-27 Thread Paweł K
Thanks Raul, this plugin is exactly what I wanted and looks really promising - so I suppose there's no particular way to do this without any plugin? On 27 Kwi, 09:49, Raul Murciano r...@murciano.net wrote: You may find useful my translate_routes plugin:  http://github.com/raul/translate_routes

[Rails] Re: Translated (language-aware) routes in Rails application

2010-04-27 Thread Paweł K
So there's no way to achieve this effect without plugin? Like scope or namespace? On 27 Kwi, 09:49, Raul Murciano r...@murciano.net wrote: You may find useful my translate_routes plugin:  http://github.com/raul/translate_routes -- Raul Murciano Freelance Web Developer

Re: [Rails] Re: Philosophical question about MVC

2010-04-27 Thread Antonio Tapiador del Dujo
Very interesting solution. And pretty similar to Station, btw. Many thanks for the link Robert! El Lunes, 26 de Abril de 2010 20:15:32 Robert Walker escribió: Antonio Tapiador del Dujo wrote: Hi folks, I am working on Station, a Rails Engine [1] that supports authorization among other

[Rails] how to start an edge rails app

2010-04-27 Thread Joe
I want to check out an issue in edge rails. I've never used edge before and am having a lot of trouble getting it up and running. Following modified instructions from http://ariejan.net/2009/01/04/how-to-start-a-rails-edge-app-the-easy-way/ $ mkdir -p app/vendor $ cd app $ git clone

[Rails] establish_connection issues

2010-04-27 Thread DanC
Hi, I have created a new app but I would like to use some database tables from another application - so I am trying to use establish_connection Here is my code.. Model file class User ActiveRecord::Base establish_connection :external_database_development Database.yml .. standard

[Rails] regular expression problem

2010-04-27 Thread HUNT HUNT
var text=Afganistan (+86) var code=text.sub(/\w+/, '') result: code = (+86) -- var text = Antigua and Barbuda (+1268) var code=text.sub(/\w+/, '') result : code = and Barbuda (+1268) -- what regular expression I can try to get

[Rails] ruby on rails and ruby gems vanished from cpanel theme x3

2010-04-27 Thread Terry Robertson
Clints have reported that overnighr Ruby on Rails and Ruby Gems have vanished from their cpanel x3 themes, but i have some clients uing the cpanel theme rvblue and it is still displayed, so this shows that it is still on the server. any ideas what has gone wrong and how can i fix this. -- You

[Rails] Re: regular expression problem

2010-04-27 Thread Ben Woodcroft
HUNT HUNT wrote: var text=Afganistan (+86) var code=text.sub(/\w+/, '') result: code = (+86) -- var text = Antigua and Barbuda (+1268) var code=text.sub(/\w+/, '') result : code = and Barbuda (+1268) -- what regular

[Rails] Multiple Joins to a single table

2010-04-27 Thread Ben Woodcroft
Hi, Is it possible to join multiple times to the same table with ActiveRecord? For instance: - class Deck ActiveRecord::Base has_many :cards end class Card ActiveRecord::Base end - And then I run a query for decks that contain

Re: [Rails] regular expression problem

2010-04-27 Thread Vladimir Rybas
Antigua and Barbuda (+1268).scan(/\d+/).to_s = 1268 Antigua and Barbuda (+1268).scan(/\(\+\d+\)/).to_s = (+1268) On Tue, Apr 27, 2010 at 4:47 PM, HUNT HUNT li...@ruby-forum.com wrote: var text=Afganistan (+86) var code=text.sub(/\w+/, '') result: code = (+86)

Re: [Rails] Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
Yes, class Deck ActiveRecord::Base has_many :cards has_many :cool_cards, :through = :cards end class Card ActiveRecord::Base end On Tue, Apr 27, 2010 at 15:50, Ben Woodcroft li...@ruby-forum.com wrote: Hi, Is it possible to join multiple times to the same table with ActiveRecord? For

Re: [Rails] regular expression problem

2010-04-27 Thread David A. Black
Hi -- On Tue, 27 Apr 2010, Vladimir Rybas wrote: Antigua and Barbuda (+1268).scan(/\d+/).to_s = 1268 Antigua and Barbuda (+1268).scan(/\(\+\d+\)/).to_s = (+1268) There's a nice technique for quickly getting a substring from a string using a subscript-style notation: Antigua and Barbuda

Re: [Rails] regular expression problem

2010-04-27 Thread Vladimir Rybas
nice one David! On Tue, Apr 27, 2010 at 5:34 PM, David A. Black dbl...@rubypal.com wrote: Hi -- On Tue, 27 Apr 2010, Vladimir Rybas wrote: Antigua and Barbuda (+1268).scan(/\d+/).to_s = 1268 Antigua and Barbuda (+1268).scan(/\(\+\d+\)/).to_s = (+1268) There's a nice technique for

[Rails] jruby-openssl

2010-04-27 Thread Veena Jose
Hai friends, I am sending emails using the GMail mail server with TLS. I need to install openssl for that functionality. But whenever i try to install it using jruby -S gem install jruby-openssl it is giving me error, JRuby limited openssl loaded. gem install jruby-openssl for full support.

[Rails] Re: regular expression problem

2010-04-27 Thread HUNT HUNT
Vladimir Rybas wrote: nice one David! I did with this var code=text.sub(/[a-z A-Z]/, '') -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] RUBY EVAL FUNCTION

2010-04-27 Thread kevid
Hi all, I have the code below from mechanize gem [ the file is module.rb]. am a newbie in ruby. Could anyone help me redesign the code below to use either (a) block eval OR (b) not use eval at all. Thoughts ? class Module def attr_finder(*syms) syms.each do |sym| class_eval %{

[Rails] Re: lots of views for a single controller

2010-04-27 Thread Ar Chron
richardsugg wrote: * show_general.html.erb # shows general information (remote access, company name, active or not, etc) To keep things simple, show is just show... and can render the data you want to have constant across any variations - no need for a header partial there. But a different

[Rails] Re: RESTful style: multiple plot styles, query strings

2010-04-27 Thread Sharagoz
I love REST, but I dont practice it like religion. Developing an application using nothing but seven controller actions will quickly defeat the purpose of a clean API. The question here is: What do you do with operations that doesn't neatly fit into basic CRUD? - Put it into one of the seven

[Rails] POST a JSON to and API

2010-04-27 Thread face7hill
Hello Folks, I'm trying to POST a JSON object to an API: { input: http://www.example.com/input/video.mov;, output: [ { base_url: http://www.example.com/output/;, filename: video.mp4, thumbnails: { number: 1, size: 86x66 } } ] } What's the

[Rails] Re: Multiple Joins to a single table

2010-04-27 Thread Ben Woodcroft
Dhruva Sagar wrote: Yes, class Deck ActiveRecord::Base has_many :cards has_many :cool_cards, :through = :cards end Thanks for the help Dhruva, but doesn't that mean that there is a cool_cards foreign key in the cards cards table? I don't quite understand how this helps - what query

[Rails] Translation Failure

2010-04-27 Thread LeonS
Hi, i'm getting a translation failure: translation data {:username=Benutzername} can not be used with :count = 1 What does this means? In my de.yml File i wrote in the activerecord part: models: user: username: 'Benutzername' Thanks -- You received this message

[Rails] Re: Picasa on a rails application

2010-04-27 Thread HUNT HUNT
swetha wrote: Hi friends, I have a requirement to import picasa photos into rails application. (Similar to the option import from picasa in orkut). Do we have any plugin's to access picasa pictures. Help needed.Thankyou. You can checkout this as rails plugin using command script/plugin

[Rails] Re: Multiple Joins to a single table

2010-04-27 Thread Sharagoz
@decks_with_aces_and_kings = Deck.all(:joins = :cards, :conditions = cards.rank = 'Ace' OR cards.rank = 'King') On Apr 27, 2:42 pm, Ben Woodcroft li...@ruby-forum.com wrote: Dhruva Sagar wrote: Yes, class Deck ActiveRecord::Base  has_many :cards  has_many :cool_cards, :through = :cards

Re: [Rails] Re: Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
Hi, I think I misunderstood your email subject that you wanted to do multiple joins from activerecord with a single table, so I quickly pasted the code to do so :). Sharagoz's answer looks right. On Tue, Apr 27, 2010 at 18:12, Ben Woodcroft li...@ruby-forum.com wrote: Dhruva Sagar wrote:

[Rails] Re: Multiple Joins to a single table

2010-04-27 Thread Ben Woodcroft
Sharagoz wrote: @decks_with_aces_and_kings = Deck.all(:joins = :cards, :conditions = cards.rank = 'Ace' OR cards.rank = 'King') Looks good, except it seems my question wasn't clear (even to me re-reading it). I want decks that have kings and aces, so an OR isn't what I'm looking for. Any

Re: [Rails] Re: Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
Hi, Can't your sql be : select * from decks d inner join cards c1 on c1.deck_id=d.id where c1.rank = 'Ace' and c1.rank = 'King'; On Tue, Apr 27, 2010 at 18:40, Ben Woodcroft li...@ruby-forum.com wrote: Sharagoz wrote: @decks_with_aces_and_kings = Deck.all(:joins = :cards, :conditions =

Re: [Rails] Translation Failure

2010-04-27 Thread Leonardo Mateo
On Tue, Apr 27, 2010 at 9:52 AM, LeonS leonard.stellbr...@gmail.com wrote: Hi, i'm getting a translation failure: translation data {:username=Benutzername} can not be used with :count = 1 What does this means? In my de.yml File i wrote in the activerecord part:    models:        user:

[Rails] Re: Re: Multiple Joins to a single table

2010-04-27 Thread Ben Woodcroft
Dhruva Sagar wrote: Hi, Can't your sql be : select * from decks d inner join cards c1 on c1.deck_id=d.id where c1.rank = 'Ace' and c1.rank = 'King'; Unfortunately I don't think so. c1 cannot be both an ace and a king at the same time. I just tested your code on a rails setup with a

[Rails] JOBS (RoR Developers)

2010-04-27 Thread Paul Elkin
I have an exiting opportunity to join a new open source development project on either a permanent or temporary basis based in the North West of England. If you have strong experience developing web solutions using RoR this is an opportunity which shouldn't be missed. If you are interested, please

[Rails] Re: RESTful style: multiple plot styles, query strings

2010-04-27 Thread Marnen Laibow-Koser
Fearless Fool wrote: In my quest to practice good style, I'm a bit stumped on the following. Assume an app that lets a user visualize recent web activity on various domains (user has many domains). In ordinary RESTful style, the path /user/:user_id/domain invokes 'index' and lists all the

[Rails] Re: regular expression problem

2010-04-27 Thread Marnen Laibow-Koser
David A. Black wrote: Hi -- On Tue, 27 Apr 2010, Vladimir Rybas wrote: Antigua and Barbuda (+1268).scan(/\d+/).to_s = 1268 Antigua and Barbuda (+1268).scan(/\(\+\d+\)/).to_s = (+1268) There's a nice technique for quickly getting a substring from a string using a subscript-style

Re: [Rails] Re: Re: Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
you should then try : Deck.all(:joins = 'inner join cards c1 on c1.deck_id=d.id inner join cards c2 on c2.deck_id=d.id', :conditions = [c1.rank = 'Ace' AND c2.rank = 'King']) Forget the many, through thing that was a misunderstanding. On Tue, Apr 27, 2010 at 19:14, Ben Woodcroft

Re: [Rails] Re: Re: Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
Sorry it should be : Deck.all(:joins = 'inner join cards c1 on c1.deck_id=decks.id http://d.id inner join cards c2 on c2.deck_id=decks.id http://d.id', :conditions = [c1.rank = 'Ace' AND c2.rank = 'King']) On Tue, Apr 27, 2010 at 19:14, Ben Woodcroft li...@ruby-forum.com wrote: Dhruva Sagar

[Rails] Re: RESTful style: multiple plot styles, query strings

2010-04-27 Thread Fearless Fool
Marnen Laibow-Koser wrote: ... No. The basic 7 REST actions are common, not gospel. There's nothing wrong with making plot a custom REST action (route would be the same as above, but on the same footing with domain/:domain_id/edit ). If I understand correctly, when you say on the same

[Rails] Re: to nest or not to nest: RESTful style

2010-04-27 Thread Fearless Fool
Joe Smith wrote: The second is good in that there is never more information than is needed to identify resources. It is good if you want to let a tenant be moved to a new building in the tenant edit form. It is bad in that the forms for creating a resource require specifying the parent.

Re: [Rails] exiting the function

2010-04-27 Thread Andy Jeffries
Mohammed, you can write the above as follows: @property.destroy if IsAuthorized?(@property.user_id) Well, you could, *if* IsAuthorized? -- which idiomatically should be is_authorized? -- returned a boolean value :-) Personally I'd prefer authorized? - I never use is_...?, the is_ is just

[Rails] uncorrect encoding

2010-04-27 Thread Yerlan Kusainov
I'm have a rails project. I'm make following: script/generate scaffold product title:string description:text image_url:string as in book(Agile Web development with Rails) and rake db:migrate. When I'm create a new product, post show as '??'. In file database.yml section encoding is utf8, but

[Rails] Swf_fu in rails

2010-04-27 Thread stuckonrails
Ok, this is my problem. I am trying to embed an .swf file into my webpage using swf_fu. I installed the gem from my applications folder and added the rake task install to my rake file as per the instructions on the swf_fu page found here http://github.com/marcandre/swf_fu. I added the % swf_tag %

[Rails] undefined method 'each' in acts_as_taggable_on with rails 3 beta 3 and ruby 1.9

2010-04-27 Thread d4ny1
Hi I am trying to use acts_as_taggable_on in my new projects. But I got Error when I try to save tags. undefined method `each' for []:String NoMethodError: undefined method `each' for :String from C:/Ruby19/lib/ruby/gems/1.9.1/gems/

[Rails] longevity of ruby on rails

2010-04-27 Thread vanboom
Hi, I have recently added Ruby on Rails to my repertoire and as I start a new project, I find myself wondering: Why are so many of the postings I find as I search for help from 2006-2009? Should I start my new project with RoR, ASP.NET, Python/Django, Zen? Is RoR thriving or dying? -- You

Re: [Rails] Sessions

2010-04-27 Thread Andy Jeffries
in my application, i have login form. while login into the application iam maintaning the details in session. i want to remove the stale sessions and while removing the stale sessions i want to perform some operattions on database . how to do this. How are the sessions stored? The default

[Rails] Re: lots of views for a single controller

2010-04-27 Thread richardsugg
Thanks very much for both of your assistance. I think I've got a handle on the immediate issue as a result. On Apr 27, 8:09 am, Ar Chron li...@ruby-forum.com wrote: richardsugg wrote: * show_general.html.erb # shows general information (remote access, company name, active or not, etc) To

Re: [Rails] Sessions

2010-04-27 Thread Peter De Berdt
On 27 Apr 2010, at 17:44, Andy Jeffries wrote: in my application, i have login form. while login into the application iam maintaning the details in session. i want to remove the stale sessions and while removing the stale sessions i want to perform some operattions on database . how to do

[Rails] [JOBS] San Francisco Experienced Ruby on Rails Developers

2010-04-27 Thread John Schmocker
I actively put together engineering teams for prominent venture backed startups in the bay area. Many of my clients are looking for Ruby developers that are out of good schools and leaders in their field. If you fit the criteria I would like to speak with those who are interested as to determine a

Re: [Rails] Sessions

2010-04-27 Thread Hassan Schroeder
On Tue, Apr 27, 2010 at 8:56 AM, Peter De Berdt peter.de.be...@pandora.be wrote: Well, if you're using the cookiestore for sessions, you don't have to worry about stale sessions anyway. ? How so? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan --

Re: [Rails] Sessions

2010-04-27 Thread Peter De Berdt
On 27 Apr 2010, at 18:13, Hassan Schroeder wrote: Well, if you're using the cookiestore for sessions, you don't have to worry about stale sessions anyway. ? How so? Because the session data is kept in a cookie on the client side, not on the server in any way. The session is removed on

[Rails] Dynamic Meta data

2010-04-27 Thread spokra
What is the best way to have a table that defines what the thing is and another table that defines if you hae it or not.. maybe a table will describe what i want better!! : define the items in one table V [X] ITEM1 [_] ITEM2 [_] ITEM3 [X] ITEM4 ...

Re: [Rails] Sessions

2010-04-27 Thread Hassan Schroeder
On Tue, Apr 27, 2010 at 9:38 AM, Peter De Berdt peter.de.be...@pandora.be wrote: Well, if you're using the cookiestore for sessions, you don't have to worry about stale sessions anyway. ? How so? Because the session data is kept in a cookie on the client side, not on the server in any way.

[Rails] Re: longevity of ruby on rails

2010-04-27 Thread E. Litwin
Modded as Flamebait (oops, thought this was /.) -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: longevity of ruby on rails

2010-04-27 Thread E. Litwin
Modded as Flamebait (oops, thought this was ./) -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: how to start an edge rails app

2010-04-27 Thread Joe
So I got it to work by executing the command from within the app/ vendor/rails/railties/lib directory (from where the relative path rails/ruby_version_check does exist), but this only gets me as far as the next `require': no such file to load error. How do I deal with all these relative load

Re: [Rails] Sessions

2010-04-27 Thread Peter De Berdt
On 27 Apr 2010, at 18:50, Hassan Schroeder wrote: Well, if you're using the cookiestore for sessions, you don't have to worry about stale sessions anyway. ? How so? Because the session data is kept in a cookie on the client side, not on the server in any way. The session is removed on

[Rails] Re: longevity of ruby on rails

2010-04-27 Thread Robert Walker
vanboom wrote: Hi, I have recently added Ruby on Rails to my repertoire and as I start a new project, I find myself wondering: Why are so many of the postings I find as I search for help from 2006-2009? Should I start my new project with RoR, ASP.NET, Python/Django, Zen? Is RoR thriving

[Rails] Re: longevity of ruby on rails

2010-04-27 Thread Marnen Laibow-Koser
vanboom wrote: Hi, I have recently added Ruby on Rails to my repertoire and as I start a new project, I find myself wondering: Why are so many of the postings I find as I search for help from 2006-2009? 2006-2009 is 48 months. 2010 is not quite 4 months. The odds favor finding pre-2010

[Rails] Re: exiting the function

2010-04-27 Thread Marnen Laibow-Koser
Andy Jeffries wrote: Mohammed, you can write the above as follows: @property.destroy if IsAuthorized?(@property.user_id) Well, you could, *if* IsAuthorized? -- which idiomatically should be is_authorized? -- returned a boolean value :-) Personally I'd prefer authorized? - I never use

[Rails] Re: RESTful style: multiple plot styles, query strings

2010-04-27 Thread Marnen Laibow-Koser
Fearless Fool wrote: Marnen Laibow-Koser wrote: ... No. The basic 7 REST actions are common, not gospel. There's nothing wrong with making plot a custom REST action (route would be the same as above, but on the same footing with domain/:domain_id/edit ). If I understand correctly, when

[Rails] Hpricot files

2010-04-27 Thread kevid
hi all, I need to make use of Hpricot gem files. I don't want to install it as a gem. I copied lib/hpricot/*{all files} and lib/hpricot.rb to my application. below is lib/hpricot.rb begin require 'encoding/character/utf-8' rescue LoadError end #require 'hpricot_scan' require 'hpricot/tag'

Re: [Rails] Sessions

2010-04-27 Thread Hassan Schroeder
On Tue, Apr 27, 2010 at 9:56 AM, Peter De Berdt peter.de.be...@pandora.be wrote: That's irrelevant if the app in question depends on inactive sessions being expired. http://dev.rubyonrails.org/ticket/10751 Interesting but also irrelevant; recognizing a request for an expired session is not

[Rails] Re: Ubuntu Linux Editor / Prettiefier

2010-04-27 Thread Marnen Laibow-Koser
tonypm wrote: [...] When you've been used to the normal windows style keystrokes, Normal? What makes them any more or less normal? the emacs ones take a bit of getting used to. But I am getting there by forcing myself to use it for my real development. I am already beginning to feel

[Rails] Disable Logging on a Controller/Action

2010-04-27 Thread TomRossi7
Does anyone know what the best way to disable logging on a controller or specific action? I've seen a lot of threads, but no real best practice? Thanks, Tom -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

[Rails] Re: Dynamic Meta data

2010-04-27 Thread Tim Shaffer
This is a simple many-to-many relationship. See here: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to

[Rails] config.gem causes stack level too deep?

2010-04-27 Thread Stacy Vlasits
I'm trying to figure out why config.gem seems to cause problems. I have installed two gems 'will_paginate' and 'searchlogic' that need to be declared in the environment.rb file in order to be useful. I installed 'will_paginate' first. After putting the config.gem 'will_paginate' command in my

[Rails] Re: Disable Logging on a Controller/Action

2010-04-27 Thread Marnen Laibow-Koser
TomRossi7 wrote: Does anyone know what the best way to disable logging on a controller or specific action? I've seen a lot of threads, but no real best practice? Why would you ever want to do this? An inaccurate log is worse than none at all. What's your use case? Thanks, Tom Best,

[Rails] Re: Disable Logging on a Controller/Action

2010-04-27 Thread TomRossi7
I have an action being called by a monitoring service. Leaving this out of the log is not inaccurate, anymore than not logging static files referenced is the public folder is inaccurate. Thanks, Tom On Apr 27, 2:43 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: TomRossi7 wrote: Does

[Rails] cache logic in js_include_tag and stylesheet_link_tag?

2010-04-27 Thread Jonathan Rochkind
So using the magic :cache argument to combine multiple CSS or JS files into one cached file, using stylesheet_link_tag or javascript_include_tag respectively... I sort of figured that if the arguments to the function changed, including different files the combined cached file would be

[Rails] Re: Hpricot files

2010-04-27 Thread Stephan Wehner
On Apr 27, 10:17 am, kevid alumsimport...@yahoo.ca wrote: hi all, I need to make use of Hpricot gem files. I don't want to install it as a gem. I copied lib/hpricot/*{all files}  and lib/hpricot.rb  to my application. below is lib/hpricot.rb begin   require 'encoding/character/utf-8'

[Rails] Find by Date Regardless of Time

2010-04-27 Thread Joshua Martin
I have a datetime field in the database. How do I find records for a particular date regardless of the time of day? The method I'm trying does not work.. tasks.find(:all, :conditions = [date == ?, Date.today]) -- _ Joshua S. Martin CONFIDENTIALITY NOTE: This

[Rails] Re: Find by Date Regardless of Time

2010-04-27 Thread Frederick Cheung
On Apr 27, 9:07 pm, Joshua Martin josmar52...@gmail.com wrote: I have a datetime field in the database. How do I find records for a particular date regardless of the time of day? you need to search for records where that date column falls in the appropriate range (ie midnight on that day

Re: [Rails] Re: Find by Date Regardless of Time

2010-04-27 Thread Joshua Martin
Ah, I see. Thanks! On Tue, Apr 27, 2010 at 4:20 PM, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 27, 9:07 pm, Joshua Martin josmar52...@gmail.com wrote: I have a datetime field in the database. How do I find records for a particular date regardless of the time of day?

Re: [Rails] Re: Find by Date Regardless of Time

2010-04-27 Thread Rob Biedenharn
On Apr 27, 2010, at 4:24 PM, Joshua Martin wrote: Ah, I see. Thanks! On Tue, Apr 27, 2010 at 4:20 PM, Frederick Cheung frederick.che...@gmail.com wrote: On Apr 27, 9:07 pm, Joshua Martin josmar52...@gmail.com wrote: I have a datetime field in the database. How do I find records for a

[Rails] Re: Disable Logging on a Controller/Action

2010-04-27 Thread Marnen Laibow-Koser
TomRossi7 wrote: I have an action being called by a monitoring service. Leaving this out of the log is not inaccurate, I'm not sure I agree. The log tells you what Rails has been up to. One of the things it has been up to is servicing the requests that come from the monitoring service.

[Rails] Re: Hpricot files

2010-04-27 Thread Marnen Laibow-Koser
kevid wrote: hi all, I need to make use of Hpricot gem files. I don't want to install it as a gem. I copied lib/hpricot/*{all files} and lib/hpricot.rb to my application. Why not install it as a gem, then unpack it into vendor? And why aren't you using Nokogiri? Best, -- Marnen

[Rails] ORA-12154: TNS:... error after successful oracle connection

2010-04-27 Thread kimda
Hi, After a few days of struggling, I was able to run this command successfully. ruby -r oci8 -e OCI8.new('xxx_dba', 'xxx', '//:1521/ x.xxx.org').exec('SELECT 1 from dual') {|r| puts r.join} I got 1.0 as output and I got my prompt back. So, I went back to the RoR app that I am working

[Rails] Re: Disable Logging on a Controller/Action

2010-04-27 Thread TomRossi7
Marnen, I do appreciate the feedback, but I wonder if others agree? Maybe that is why its not a simple task within Rails? Anyone? Thanks, Tom On Apr 27, 5:08 pm, Marnen Laibow-Koser li...@ruby-forum.com wrote: TomRossi7 wrote: I have an action being called by a monitoring service.

[Rails] Re: how to start an edge rails app

2010-04-27 Thread Joe
bitsweat in #rails-contrib helped me out. railties/lib/rails/cli.rb is the wrong script. He pointed me to http://guides.rails.info/3_0_release_notes.html#living-on-the-edge, which told me to use the script railties/bin/rails. Then bitsweat corrected that page. The correct script is bin/rails

Re: [Rails] Re: Disable Logging on a Controller/Action

2010-04-27 Thread Hassan Schroeder
On Tue, Apr 27, 2010 at 3:49 PM, TomRossi7 t...@themolehill.com wrote: I do appreciate the feedback, but I wonder if others agree?  Maybe that is why its not a simple task within Rails? I think logging is a tool, and what you choose to record is up to you. That said, I have no idea how to

[Rails] Re: Disable Logging on a Controller/Action

2010-04-27 Thread Jeff Lewis
Hi Tom, Not sure if it applies to your specific case, but whenever I come across the need to quiet the logging activity for some particular verbose-under-normal-logging activity process that I'm really only concerned about logging-wise only if it fails, ... I usually just temporarily up the

[Rails] Locational relationship?

2010-04-27 Thread robo
ok, I've got a model called Location, the idea being that i have a bunch of locations aligned to a grid. Each location has a pointer to it's neighbors, like so create_table locations, :force = true do |t| t.string name t.text description t.integer north t.integer

[Rails] Re: Re: Re: Multiple Joins to a single table

2010-04-27 Thread Ben Woodcroft
Dhruva Sagar wrote: Sorry it should be : Deck.all(:joins = 'inner join cards c1 on c1.deck_id=decks.id http://d.id inner join cards c2 on c2.deck_id=decks.id http://d.id', :conditions = [c1.rank = 'Ace' AND c2.rank = 'King']) Thanks for persevering - that's what I was after. I didn't

[Rails] Re: quot;ORA-12154: TNS:...quot; error after successful oracle connection

2010-04-27 Thread Greg Clarke
kimda tkk...@... writes: Hi kimda The TNS error message from Oracle suggests the problem is with your database string. But your ruby oci8 diagnostic looks good (providing all the x's match) and I've checked here and a similar ruby oci8 connection string also works for me in Rails. (I

Re: [Rails] Re: Re: Re: Multiple Joins to a single table

2010-04-27 Thread Dhruva Sagar
Hope it worked :). On Wed, Apr 28, 2010 at 05:43, Ben Woodcroft li...@ruby-forum.com wrote: Dhruva Sagar wrote: Sorry it should be : Deck.all(:joins = 'inner join cards c1 on c1.deck_id=decks.id http://d.id inner join cards c2 on c2.deck_id=decks.id http://d.id', :conditions =

[Rails] rails and mssql

2010-04-27 Thread rhossi
My company is developing an application for a customer. The customer have an ASP.NET web site and SQL Server 2008 database. The client wants to keep SQL Server 2008 database and he is complaining that ActiveRecord does not communicate natively with SQL Server 2008. They are asking us why

[Rails] Rails and MSSQL

2010-04-27 Thread rhossi
My company is developing an application for a client. The client has an ASP.NET web site and SQL Server 2008 database and wants to keep it He is complaining that ActiveRecord does not communicate natively with SQL Server 2008 and are asking us why ActiveRecord uses freeTDS in conjunction with

[Rails] Re: Multiple Joins to a single table

2010-04-27 Thread Bob Miller
now that -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

[Rails] Re: Multiple Joins to a single table

2010-04-27 Thread Ben Woodcroft
Dhruva Sagar wrote: Hope it worked :). Yes, it did, and now I have named scopes working nicely, like named_scope :with_card(rank) in the Deck class, and I can even chain them together. Bob Miller wrote: now that eh? -- Posted via http://www.ruby-forum.com/. -- You received this

[Rails] Re: rails 3 b2+nginx report error no such file to load --

2010-04-27 Thread Bobby Marko
nevermind, got it working. Once I fully understood all of these directions: http://rvm.beginrescueend.com/integration/passenger/ I got it working. Needed to make sure that PassengerRuby was pointed to something like: /home/wayne/.rvm/bin/passenger_ruby instead of the RVM ruby -- Posted via

[Rails] Re: quot;ORA-12154: TNS:...quot; error after successful oracle connection

2010-04-27 Thread kimda
Hi Greg, You were right! Running the server from command line solved my issue. thanks! Daniel On Apr 27, 8:18 pm, Greg Clarke gregbcla...@gmail.com wrote: kimda tkk...@... writes: Hi kimda The TNS error message from Oracle suggests the problem is with your database string. But your ruby

[Rails] Re: amp;quot;ORA-12154: TNS:...amp;quot; error after successful oracle connection

2010-04-27 Thread Greg Clarke
Glad to hear it kimda. Thanks for letting me know it worked. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to

  1   2   >