[Rails] Re: PDFKit Fork() Function Unimplemented Error - HELP!

2010-08-03 Thread Frederick Cheung
On Aug 3, 6:43 pm, Dylan Mccarthy wrote: > Hello All, > > We're working on a project on a Windows machine that will use PDFKit to > convert an HTML page to a PDF. I have followed all the instructions at > GitHub (http://github.com/jdpace/PDFKit), for installing wkhtmltopdf and > PDFKit, then cre

[Rails] Re: how to deal with gender

2010-08-03 Thread Don S.
I can't help but think of the commercial (Visa I think) playing during the world cup where the child had all the names of players on a winning squad from an earlier world cup On Jul 30, 6:44 am, bingo bob wrote: > > An unlimited amount? > > Well yes, I believe so. In the vast majority of case

[Rails] Ruby on Rails Developer Needed!!!

2010-08-03 Thread sergio longoria
Project Length: 12 Months Location of Project: Costa Mesa, CA Start Date: Immediatley. Looking to possibly hire over phone interview Designs, develops, and implements web-based Java applications to support business requirements. Follows approved life cycle methodologies, creates design documen

[Rails] Re: how to configure rails to use mysql by default (not sqlite3)

2010-08-03 Thread Robert Walker
Marnen Laibow-Koser wrote: > Olivier Db wrote: >> Hello, >> >> I am running Mac OS X 10.6.4 and have installed the following: >> >> ruby-1.9.1-p429 (64 bits, I believe!) >> RubyGems 1.3.7 >> Rails 2.3.8 >> MySQL 5.1.49 (64 bits) >> >> I am now getting an error because sqlite3 is not installed >

[Rails] Re: mate -w

2010-08-03 Thread Robert Walker
Abder-Rahman Ali wrote: > I used this command to specify the text editor: $ git config --global > core.editor "mate -w" > > How can I remove this configuration as I'm getting this error: error: > cannot run mate -w: No such file or directory > > Or, how can I fix this error instead? I use the ma

[Rails] Re: require gems messing up rails install?

2010-08-03 Thread badnaam
Anyone? On Aug 2, 2:07 am, badnaam wrote: > Here is the exact error. > > Missing the Rails 2.3.5 gem. Please `gem install -v=2.3.5 rails`, > update your RAILS_GEM_VERSION setting in config/environment.rb for the > Rails version you do have installed, or comment out RAILS_GEM_VERSION > to use the

Re: [Rails] Re: Complex associations

2010-08-03 Thread Angel Robert Marquez
On Tue, Aug 3, 2010 at 9:11 AM, Trish wrote: > See below... > > Thanks! > Trish > > On Aug 3, 11:00 am, Angel Robert Marquez > wrote: > > > Thank you for your response. However, I am refactoring an existing > > > application, and am trying to remove a bunch of pure SQL that was put > > > in the

[Rails] Re: :url being ignored or routing problem?

2010-08-03 Thread suzuki
if i understand your question properly, i get a page with a partial, where the partial area displays a 404 error ("The page you were looking for doesn't exist. You may have mistyped the address or the page may have moved.") i expect (but don't want!) this, since routing is parsing my intentions

[Rails] Re: Error with Gem Outdated command

2010-08-03 Thread Paul Harrington
John T. wrote: > Not one to bump topics, but I'm still getting this error.. and it's been > 2 months... I can't help, but you'll get more luck on the Rubygems mailing list or the main Ruby list. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] Re: Error with Gem Outdated command

2010-08-03 Thread John T.
Not one to bump topics, but I'm still getting this error.. and it's been 2 months... Thanks John T. wrote: Trying to run 'gem outdated' on OS X (10.6.3) and I'm getting: sudo gem outdated ERROR: While executing gem ... (NoMethodError) undefined method `first' for nil:NilClass Here's

[Rails] mate -w

2010-08-03 Thread Abder-Rahman Ali
I used this command to specify the text editor: $ git config --global core.editor "mate -w" How can I remove this configuration as I'm getting this error: error: cannot run mate -w: No such file or directory Or, how can I fix this error instead? Thanks. -- Posted via http://www.ruby-forum.com/.

[Rails] parent controller_name (nested)

2010-08-03 Thread Rodrigo Mendonça
Hi people, i have this route in rails http://localhost:3002/gdm/9/cd/posts/10/comments we can see we have a namespace with prefix in gdm/9/cd/ also we have two controllers i will create a helper, and need get ther controllers name with commands i know i can get "comments" with <%=controller_n

Re: [Rails] Re: Strange error message when rendering the scaffold form

2010-08-03 Thread Cesar Sanz
Stop your server and run it again -original message- Subject: [Rails] Re: Strange error message when rendering the scaffold form From: Jeff Date: 08/03/2010 14:10 On Aug 3, 2:14 pm, rodrigo3n wrote: > Hello everyone, I am developing my application and I created a > scaffold called listas, but

Re: [Rails] Re: rails 3 download - where ?

2010-08-03 Thread Fidel Viegas
If you want to upgrade from previous versions, I suggest you look into http://www.railsupgradehandbook.com/ I haven't really played with Rails 3 that serious. I am still using 2.3.8, and will only jump to rails 3 when it is production ready. But I have been playing with it from time to time and fo

[Rails] Re: rails 3 download - where ?

2010-08-03 Thread Dani Dani
Fidel Viegas wrote: > gem install rails --pre > > this will install rails 3.0 rc1 > > All the best, > > Fidel. thank you. this has helped upgrading, problem is I got the following error: ERROR: While executing gem ... (Errno::EINVAL) Invalid argument - ./http://www.ruby-forum.com/. --

[Rails] Rails 2.3.8 and form_tag usage

2010-08-03 Thread crashbangboom
I have just upgraded my entire system to use the subject line version of rails...of course...this broke my previous rails apps as many things are handled a bit differently...! I have all apps running fine now but am having a problem when using form_tag over form_for...(I need form_tag so I can use

[Rails] Re: rails 2.3.8 and html_safe

2010-08-03 Thread Robert Walker
Andrew Kaspick wrote: > I just wanted to know if others are having this issue, and it sounds > like people are, but I'm still not sure if this is a bug or if this is > the expected behviour for 2.3.8. If this is expected behaviour for > 2.3.8 then this should not have been in a "minor" point re

[Rails] Re: Restfull routes, link_to, and additional paramters

2010-08-03 Thread Bob Proulx
Jonathan Steel wrote: > I am trying to do a link_to with multiple to create an object. > Everything works until ad the second parameter in. As soon as I add the > second parameter, it forgets to add any information about the first one. What do you mean, "it forgets to add any information about the

[Rails] Rails3 + rcov

2010-08-03 Thread Greg Donald
I hit a wall today with rcov + Rails3. I am developing my Rails3 app using Ruby 1.9.2-preview3. rcov and relevance-rcov do not work with Ruby 1.9.2 yet. I can't find any fork of rcov that does yet either. It wasn't that big of a deal since I could easily switch over to Ruby 1.8.7 using rvm --de

Re: [Rails] rails 3 download - where ?

2010-08-03 Thread jason white
Ryan Bates from railscasts.com has an excellent screencast on this subject. The links you are looking for are on the page under resources. http://railscasts.com/episodes/225-upgrading-to-rails-3-part-1 On Tue, Aug 3, 2010 at 4:04 PM, Dani Dani wrote: > I'm trying to update my rails from 2.3

Re: [Rails] rails 3 download - where ?

2010-08-03 Thread Fidel Viegas
gem install rails --pre this will install rails 3.0 rc1 All the best, Fidel. On 8/3/10, Dani Dani wrote: > I'm trying to update my rails from 2.3.8 to 3.0, where can I get the kit > from ? > > Thanks, > Dani > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message becau

[Rails] rails 3 download - where ?

2010-08-03 Thread Dani Dani
I'm trying to update my rails from 2.3.8 to 3.0, where can I get the kit from ? Thanks, Dani -- 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...

[Rails] Re: simple redirect_to shows in log but doesn't redirect

2010-08-03 Thread Neil Bye
Joshua Mckinney wrote: Try using: > def create > @story = Story.find(params[:story_id]) > @story.comments.create params[:comment] > request.format = :js > respond_to do |format| > format.js > end > end > > Although respond _to blocks are not always necessary, it can't hur

[Rails] Re: rails 2.3.8 and html_safe

2010-08-03 Thread Andrew Kaspick
Andrew Kaspick wrote: > Robert Walker wrote: >> Andrew Kaspick wrote: >>> Exactly. I'm not using the rails_xss plugin, but the escaping rules are >>> not as they were in 2.3.5. String literals were "safe" in 2.3.5, but >>> aren't in 2.3.8... a minor difference with huge implications. >> >> I c

Re: [Rails] Returning last value

2010-08-03 Thread clanlaw
On 3 August 2010 14:17, Bla ... wrote: > Hi. > > I have the following controller of the update action: > > [code] > def update >   �...@projeto = Projeto.find(params[:id]) > >    if (@projeto.update_attributes(params[:projeto])) > >    ## Mesmo raciocínio utilizado no create. >   �...@permissaoa =

[Rails] Re: Strange error message when rendering the scaffold form

2010-08-03 Thread Jeff
On Aug 3, 2:14 pm, rodrigo3n wrote: > Hello everyone, I am developing my application and I created a > scaffold called listas, but when I acess /listas/new I get this error > message: > > NoMethodError in Listas#new > > Showing /home/rodrigo3n/code/listeiroo/app/views/listas/_form.html.erb > where

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-03 Thread Marnen Laibow-Koser
Avdi Grimm wrote: > Marnen Laibow-Koser wrote: >> And there's an argument to be made that since the AR framework is part >> of an AR class, it must be respected -- and hit *some* state-preserving >> DB-like thing -- to properly unit test an AR class. > > This is the kind of muddling of concepts

[Rails] Re: InvalidToken for a Flash upload

2010-08-03 Thread Lily ^_^
Lily ^_^ wrote: > Hi, > > I am developping a small Flash app to upload multiple files with a > progress bar in a Rails site. > > Rails handles the server side. I have a controller that displays the > view containing the flash, and it also provides a security token to the > flash. The Flash gets i

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-03 Thread Avdi Grimm
Marnen Laibow-Koser wrote: > And there's an argument to be made that since the AR framework is part > of an AR class, it must be respected -- and hit *some* state-preserving > DB-like thing -- to properly unit test an AR class. This is the kind of muddling of concepts that I think Rails encourag

[Rails] Re: rails 2.3.8 and html_safe

2010-08-03 Thread Andrew Kaspick
Robert Walker wrote: > Andrew Kaspick wrote: >> Exactly. I'm not using the rails_xss plugin, but the escaping rules are >> not as they were in 2.3.5. String literals were "safe" in 2.3.5, but >> aren't in 2.3.8... a minor difference with huge implications. > > I created a quick-n-dirty test ap

[Rails] Re: SystemExit: exit

2010-08-03 Thread Robert Walker
Pale Horse wrote: > ActionView::TemplateError (SystemExit: exit: SELECT * FROM > product_stocklevels WHERE (product_stocklevels.product_id = 831 AND > (size = 'W44 L 32' AND stock > 0)) LIMIT 1) > > Before I paste more code, has anyone come across this before? Maybe you need to paste more code.

[Rails] Re: rendering multiline Javascript by using JSONP in rails

2010-08-03 Thread Marnen Laibow-Koser
Lucas wrote: >> No. �The problem is that your double-quoted string contains double >> quotes! > > It contains double-quotes but they are escaped aren't they ? Whoops! You're right. I somehow overlooked the backslashes. > >> There are quoting constructs that would do the trick. �But you have a

[Rails] Re: rails 2.3.8 and html_safe

2010-08-03 Thread Robert Walker
Andrew Kaspick wrote: > Exactly. I'm not using the rails_xss plugin, but the escaping rules are > not as they were in 2.3.5. String literals were "safe" in 2.3.5, but > aren't in 2.3.8... a minor difference with huge implications. I created a quick-n-dirty test app. See the result here: http:

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-03 Thread Marnen Laibow-Koser
Avdi Grimm wrote: > 1. Why are we suddenly discussing a two year old post here? Clue me in. My apologies! It appeared at the top of my list feed and I neglected to check the date. I'm not sure why it appeared at the top of my feed. [...] > But briefly, I'll say this: if you are including the D

[Rails] Re: Re: Prevent Helper Automatically Escaping String

2010-08-03 Thread Robert Walker
Robert Walker wrote: > some_string = "alert("Gotcha!")" Ignore my still syntax error above with the nested double quotes. Single quote the string in the JS part or fix however you like. > <%= h some_string %> or <%= html_escape some_string %> > => alert("Gotcha!") > > <%= some_string %> > => [[

[Rails] Strange error message when rendering the scaffold form

2010-08-03 Thread rodrigo3n
Hello everyone, I am developing my application and I created a scaffold called listas, but when I acess /listas/new I get this error message: NoMethodError in Listas#new Showing /home/rodrigo3n/code/listeiroo/app/views/listas/_form.html.erb where line #15 raised: undefined method `deep_symbolize

[Rails] Re: segmentation fault from mysql_adapter.rb

2010-08-03 Thread Patrick Aron
Divya Mohan wrote: > Not yet solved. :( I had a simular problem (i am also newbie) for me it was solved by adding "host: localhost" in the config/database.yml file Hope it can help some others to.. grtz, patrick -- Posted via http://www.ruby-forum.com/. -- You received this message because

[Rails] Re: rails 2.3.8 and html_safe

2010-08-03 Thread Andrew Kaspick
Robert Walker wrote: > Andrew Kaspick wrote: >> I'm upgrading an app from 2.3.5 to 2.3.8 and there are many spots where >> previous code was output correctly and now it expects html_safe method >> calls to properly escape the strings. Are those who don't want to use >> the new escaping behaviour i

[Rails] Re: Re: Prevent Helper Automatically Escaping String

2010-08-03 Thread Robert Walker
Michael Satterwhite wrote: > Philip Hallstrom wrote: > >> Ah. Then look at >> activesupport/lib/active_support/core_ext/string/output_safety.rb > > OK, I'm looking at it. I must be dense, though - or I've got a BAD case > of tunnel vision. > > How do I STOP these from changing the string? I'm

[Rails] Re: Prevent Helper Automatically Escaping String

2010-08-03 Thread Michael Satterwhite
Robert Walker wrote: > Michael Satterwhite wrote: >> Philip Hallstrom wrote: >> >>> def my_helper >>> "my unsafe string".html_safe! >>> end >>> >>> See http://weblog.rubyonrails.org/2009/10/12/what-s-new-in-edge-rails > > Or you can use the raw method in the view I think: THANK YOU! THANK YOU

[Rails] Re: rails 2.3.8 and html_safe

2010-08-03 Thread Robert Walker
Andrew Kaspick wrote: > I'm upgrading an app from 2.3.5 to 2.3.8 and there are many spots where > previous code was output correctly and now it expects html_safe method > calls to properly escape the strings. Are those who don't want to use > the new escaping behaviour in the 2.3.x branch expected

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-03 Thread Avdi Grimm
1. Why are we suddenly discussing a two year old post here? Clue me in. 2. Myron Marsten is now the maintainer of NullDB. See http://github.com/nulldb/nulldb 3. I'm not really interested in rehashing the arguments for NullDB. Enough teams are happily using it that I had to transfer maintainersh

[Rails] Re: Re: Prevent Helper Automatically Escaping String

2010-08-03 Thread Michael Satterwhite
Philip Hallstrom wrote: > Ah. Then look at > activesupport/lib/active_support/core_ext/string/output_safety.rb OK, I'm looking at it. I must be dense, though - or I've got a BAD case of tunnel vision. How do I STOP these from changing the string? I'm sure it's obvious ... but I'm not seeing

[Rails] Re: rendering multiline Javascript by using JSONP in rails

2010-08-03 Thread Lucas
> No.  The problem is that your double-quoted string contains double > quotes! It contains double-quotes but they are escaped aren't they ? > There are quoting constructs that would do the trick.  But you have a > bigger problem: you really shouldn't be doing this in the controller. > Rendered J

[Rails] Re: Prevent Helper Automatically Escaping String

2010-08-03 Thread Robert Walker
Michael Satterwhite wrote: > Philip Hallstrom wrote: > >> def my_helper >> "my unsafe string".html_safe! >> end >> >> See http://weblog.rubyonrails.org/2009/10/12/what-s-new-in-edge-rails Or you can use the raw method in the view I think: <%= raw my_helper %> Sort of like the opposite of the

[Rails] Re: The Future OF RUBY and RUBY ON RAILS

2010-08-03 Thread Matt Jones
On Aug 3, 3:03 am, Phoenix Rising wrote: > From a career growth/job availability perspective, let me just tell > you this: I'm basically what you'd call a "mid level" developer.  I'm > 28, been working as a web applications developer for 9 years this > winter, have no *formal* training in OOP me

Re: [Rails] Re: Prevent Helper Automatically Escaping String

2010-08-03 Thread Philip Hallstrom
>> def my_helper >> "my unsafe string".html_safe! >> end >> >> See http://weblog.rubyonrails.org/2009/10/12/what-s-new-in-edge-rails > > I'm not running edge rails, I'm running Rails 2.3.8. > > There is no html_safe! method defined, so this won't work. Ah. Then look at activesupport/lib/acti

[Rails] Re: simple redirect_to shows in log but doesn't redirect

2010-08-03 Thread joshmc...@gmail.com
The 2 most direct causes I can think of that would produce that error would be: 1. create.js.rjs is not in the correct director (.../app/views/ comments/create.js.rjs 2. create.js.rjs does not exist or bad file name Try using: def create @story = Story.find(params[:story_id]) @story.com

[Rails] Re: Prevent Helper Automatically Escaping String

2010-08-03 Thread Michael Satterwhite
Philip Hallstrom wrote: > def my_helper > "my unsafe string".html_safe! > end > > See http://weblog.rubyonrails.org/2009/10/12/what-s-new-in-edge-rails I'm not running edge rails, I'm running Rails 2.3.8. There is no html_safe! method defined, so this won't work. -- Posted via http://www.rub

[Rails] Re: rails 2.3.8 and html_safe

2010-08-03 Thread Owain
I just hit a similar problem where I was concatenating strings with escapable characters within a formbuilder. I googled about and there seems to be a some logic being discussed that anything that is "magic security" is going to be a nightmare. My problems were quite isolated (the great thing abo

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-03 Thread Eric Schmitt
Marnen, You make some interesting points... I think I still have a ton to learn about unit testing and TDD best practices. I'm still just getting started. Thanks for the info! Warmest Regards, Eric -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscri

Re: [Rails] Prevent Helper Automatically Escaping String

2010-08-03 Thread Philip Hallstrom
> I'm writing a helper to generate the display of a product and its > information as retrieved from the database. Several HTML tags are part > of this. > > As I'm building the string I want included in the HTML, Rails is > automatically escaping the string - which prevents me from actually > using

[Rails] Restfull routes, link_to, and additional paramters

2010-08-03 Thread Jonathan Steel
I am trying to do a link_to with multiple to create an object. Everything works until ad the second parameter in. As soon as I add the second parameter, it forgets to add any information about the first one. link_to "create", foos_path(@foo, :bar_id => @bar.id), :method => :post What am I doing i

[Rails] Prevent Helper Automatically Escaping String

2010-08-03 Thread Michael Satterwhite
I'm writing a helper to generate the display of a product and its information as retrieved from the database. Several HTML tags are part of this. As I'm building the string I want included in the HTML, Rails is automatically escaping the string - which prevents me from actually using the string I

[Rails] Re: rendering multiline Javascript by using JSONP in rails

2010-08-03 Thread Marnen Laibow-Koser
Lucas wrote: > Hello everybody, > > In a controller I try to render a javascript google ad to print it > into some HTML using JSONP, like this > > >src="

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-03 Thread Marnen Laibow-Koser
Eric Schmitt wrote: > > Marnen, > > I'm fairly new to unit testing and TDD, I've been doing test-first development as long as I've been doing Rails development, nearly 3 years. (Whether that means that I too am new to unit testing is left as an exercise for the student.) ? but I think I und

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-03 Thread Eric Schmitt
> I'm fairly new to unit testing and TDD, but I think I understand the > concept of what they're talking about here. The point is that if you are > writing to the database during unit tests, you're actually testing the > database adapter and abstraction layer, in this case: ActiveRecord, and >

[Rails] rendering multiline Javascript by using JSONP in rails

2010-08-03 Thread Lucas
Hello everybody, In a controller I try to render a javascript google ad to print it into some HTML using JSONP, like this http://pagead2.google.com/pgad/show_ads.js";

[Rails] PDFKit Fork() Function Unimplemented Error - HELP!

2010-08-03 Thread Dylan Mccarthy
Hello All, We're working on a project on a Windows machine that will use PDFKit to convert an HTML page to a PDF. I have followed all the instructions at GitHub (http://github.com/jdpace/PDFKit), for installing wkhtmltopdf and PDFKit, then creating the config file in 'config/initializers/pdfkit.rb

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-03 Thread Eric Schmitt
Marnen Laibow-Koser wrote: > Avdi Grimm wrote: >> == What >> >> NullDB is a Rails database connection adapter that interprets common >> database operations as no-ops. It is the Null Object pattern as >> applied to database adapters. > [...] >> == Why >> >> NullDB is intended to assist in writing

[Rails] Re: simple redirect_to shows in log but doesn't redirect

2010-08-03 Thread Neil Bye
Latest development. I've changed the ajax call stories/show.html.erb to <%= render :partial => 'comment' %> Make a comment: <% remote_form_for :comment, :update =>'aremark', :url=>story_comments_path(@story) do |form| %> <%= form.text_field :body %> <%= submit_tag 'Commen

[Rails] rails 2.3.8 and html_safe

2010-08-03 Thread Andrew Kaspick
Hi, Can somebody update me on the state of html_safe strings in rails 2.3.8? I know rails 2.3.6 and 2.3.7 broke a lot of code because strings were being escaped when they shouldn't have been and I thought this was all fixed in 2.3.8. I'm upgrading an app from 2.3.5 to 2.3.8 and there are many sp

[Rails] Re: How to CSS

2010-08-03 Thread Marnen Laibow-Koser
Fernando Perez wrote: >>> How do you organize that? >> >> The latter way. > > Ok. > > >> I also *highly* recommend using Sass: CSS alone is not >> powerful enough to fully separate content from presentation in a >> maintainable way -- Sass' higher-level abstractions are necessary here. > >

Re: [Rails] Re: How to CSS

2010-08-03 Thread Bob Nadler
On Tue, Aug 3, 2010 at 12:42 PM, Fernando Perez wrote: >>> How do you organize that? >> >> The latter way. > > Ok. Also, take a look at http://www.alistapart.com/articles/progressiveenhancementwithcss. The article recommends ways for splitting up your CSS. > >> I also *highly* recommend using Sa

[Rails] Re: simple redirect_to shows in log but doesn't redirect

2010-08-03 Thread Neil Bye
Joshua Mckinney wrote: > Have you tried naming the file create.js.rjs? Good idea but no difference. The latest configuration of the create function is: def create @story = Story.find(params[:story_id]) @story.comments.create params[:comment] request.format = :js end Gives a page w

[Rails] Re: How to CSS

2010-08-03 Thread Fernando Perez
>> How do you organize that? > > The latter way. Ok. > I also *highly* recommend using Sass: CSS alone is not > powerful enough to fully separate content from presentation in a > maintainable way -- Sass' higher-level abstractions are necessary here. I find sass "ugly", and I reviewed "less

[Rails] Re: Complex associations

2010-08-03 Thread Trish
See below... Thanks! Trish On Aug 3, 11:00 am, Angel Robert Marquez wrote: > > Thank you for your response.  However, I am refactoring an existing > > application, and am trying to remove a bunch of pure SQL that was put > > in the code.  I believe the best way to do this is with a table > > ass

[Rails] Re: how to configure rails to use mysql by default (not sqlite3)

2010-08-03 Thread Marnen Laibow-Koser
Olivier Db wrote: > Hello, > > I am running Mac OS X 10.6.4 and have installed the following: > > ruby-1.9.1-p429 (64 bits, I believe!) > RubyGems 1.3.7 > Rails 2.3.8 > MySQL 5.1.49 (64 bits) > > I am now getting an error because sqlite3 is not installed SQLite comes with Mac OS. The OS uses i

Re: [Rails] Re: Complex associations

2010-08-03 Thread Angel Robert Marquez
> > Thank you for your response. However, I am refactoring an existing > application, and am trying to remove a bunch of pure SQL that was put > in the code. I believe the best way to do this is with a table > association. Why do you believe this? > One of the big features I want to use out o

[Rails] Re: Re: Languages

2010-08-03 Thread Marnen Laibow-Koser
Pale Horse wrote: > Marnen Laibow-Koser wrote: >> Pale Horse wrote: >> [...] >>> How effective and accurate are the I18N translation solutions? More-so >>> than members of the foreign-speaking countries themselves that my client >>> is in contact with? >> >> The Rails I18N modules are not translat

[Rails] Re: How to CSS

2010-08-03 Thread Marnen Laibow-Koser
Fernando Perez wrote: > Hi, > > It's not specifically related to Rails, but how do you arrange your CSS > files? > > I used to dump everything in a gigantic screen.css file. Then I noticed > that some rules only appeared in a few pages. > > Therefore I am considering having a layout.css for all

[Rails] Re: Re: Languages

2010-08-03 Thread Pale Horse
Marnen Laibow-Koser wrote: > Pale Horse wrote: > [...] >> How effective and accurate are the I18N translation solutions? More-so >> than members of the foreign-speaking countries themselves that my client >> is in contact with? > > The Rails I18N modules are not translation solutions. They're sim

[Rails] Re: simple redirect_to shows in log but doesn't redirect

2010-08-03 Thread joshmc...@gmail.com
Have you tried naming the file create.js.rjs? On Aug 2, 11:46 am, Neil Bye wrote: > Joshua Mckinney wrote: > > From inside your create method in the controller, what does > > request.format return? > > > If the request is a plain old html request is should put "text/html" > > If the request is an

[Rails] Re: Re: Languages

2010-08-03 Thread Marnen Laibow-Koser
Pale Horse wrote: [...] > How effective and accurate are the I18N translation solutions? More-so > than members of the foreign-speaking countries themselves that my client > is in contact with? The Rails I18N modules are not translation solutions. They're simply modules for managing the translat

[Rails] How to CSS

2010-08-03 Thread Fernando Perez
Hi, It's not specifically related to Rails, but how do you arrange your CSS files? I used to dump everything in a gigantic screen.css file. Then I noticed that some rules only appeared in a few pages. Therefore I am considering having a layout.css for all pages and roughly 1 css file per control

[Rails] Re: Re: Languages

2010-08-03 Thread Pale Horse
Marnen Laibow-Koser wrote: > > Rails I18N is not "really nice". I recommend fast_gettext instead. > >> If you think that translate an application to 6 different languages >> doesn't need an elegant and easy-to-maintain solution, then you're in >> trouble. > > Agreed. > Or is your question

[Rails] Re: ActiveRecord - find MySQL connection/thread ID for query

2010-08-03 Thread Michaël
> > It would be really useful if, when one of these > > large finds is run, that I could record the thread ID it creates so if > > I need to kill a thread, I can match it back up to the originating > > find() call. > > If the database kills a thread, can't you just rescue the appropriate > excepti

[Rails] Re: Re: Languages

2010-08-03 Thread Marnen Laibow-Koser
Leonardo Mateo wrote: > On Tue, Aug 3, 2010 at 11:06 AM, Pale Horse > wrote: >> >> I've not read this, though I imagine it to be overkill for my purposes. > Really? > You should read it. That's how rails works with i18n. Overkill would > be to implement a different solution when a lot (and I

[Rails] Re: ActiveRecord - find MySQL connection/thread ID for query

2010-08-03 Thread Marnen Laibow-Koser
Michaël wrote: > On Aug 3, 1:24�pm, Marnen Laibow-Koser wrote: >> >> > Many thanks, >> > Micha l [Please quote what you're replying to. It will make the discussion easier to follow.] > > Because the application I'm maintaining uses Model find() methods to > run large queries on the database t

[Rails] Re: Drop down box in ruby

2010-08-03 Thread Bob Proulx
Chad Weier wrote: > I have an class called time in my libs folder and I want to call an > array from this class and populate a drop down box/select box in rails > in one of my view pages. > > everything online is so confusing regarding this.. There are multiple ways of invoking the helpers to pro

[Rails] Re: Complex associations

2010-08-03 Thread Trish
Thank you for your response. However, I am refactoring an existing application, and am trying to remove a bunch of pure SQL that was put in the code. I believe the best way to do this is with a table association. One of the big features I want to use out of this is retrieving the records in the

Re: [Rails] Re: Languages

2010-08-03 Thread Leonardo Mateo
On Tue, Aug 3, 2010 at 11:06 AM, Pale Horse wrote: > Robert Walker wrote: >> Pale Horse wrote: >>> My client has a translator and wants a lot of his page content to be >>> translated into 6 different languages. >>> >>> When a user selects their language on the front end, it need to alter >>> the P

[Rails] Re: Rails 3: Update responding with empty json

2010-08-03 Thread Rasmus Nielsen
Fabio Kreusch wrote: > I am still stuck with this. Does anyone knows if this is the expected > beavior for Rails? Should respond_with on update really return an > empty json object? I pretty sure the Rails behavior is as intended. Rails basically says the save was successful by returning a 200 st

[Rails] Re: Languages

2010-08-03 Thread Pale Horse
Robert Walker wrote: > Pale Horse wrote: >> My client has a translator and wants a lot of his page content to be >> translated into 6 different languages. >> >> When a user selects their language on the front end, it need to alter >> the Page content, Page title and Navigation title. >> >> I've m

[Rails] Re: Juggernaut Rails 3

2010-08-03 Thread Rémi Gagnon
Same thing for me, I plan to put online a site with juggernaut this fall, an I keep wondering if its the right gem for a chatting engine. Is there any other gem or libs more up to date? Rémi Kenneth     wrote: > Are there any plans to update the Juggernaut gem to be compatible with > Rails 3?

[Rails] Re: Languages

2010-08-03 Thread Robert Walker
Pale Horse wrote: > My client has a translator and wants a lot of his page content to be > translated into 6 different languages. > > When a user selects their language on the front end, it need to alter > the Page content, Page title and Navigation title. > > I've made alternate columns in my da

[Rails] Languages

2010-08-03 Thread Pale Horse
My client has a translator and wants a lot of his page content to be translated into 6 different languages. When a user selects their language on the front end, it need to alter the Page content, Page title and Navigation title. I've made alternate columns in my database for the other languages.

[Rails] Returning last value

2010-08-03 Thread Bla ...
Hi. I have the following controller of the update action: [code] def update @projeto = Projeto.find(params[:id]) if (@projeto.update_attributes(params[:projeto])) ## Mesmo raciocínio utilizado no create. @permissaoA = Permissao.find(:first, :conditions => ["usuario_id = ?", @pro

[Rails] Re: ActiveRecord - find MySQL connection/thread ID for query

2010-08-03 Thread Michaël
On Aug 3, 1:24 pm, Marnen Laibow-Koser wrote: > Michaël wrote: > > Hi, > > > Is it possible, when using a find method with a Model, to record the > > MySQL thread ID for the subsequent database query? Does ActiveRecord > > expose this? > > Why on earth would you need this?  What are you trying t

[Rails] Re: [ANN] NullDB 0.0.1

2010-08-03 Thread Marnen Laibow-Koser
Avdi Grimm wrote: > == What > > NullDB is a Rails database connection adapter that interprets common > database operations as no-ops. It is the Null Object pattern as > applied to database adapters. [...] > == Why > > NullDB is intended to assist in writing fast database-independant unit > tests

Re: [Rails] Adding data as a transaction

2010-08-03 Thread Colin Law
On 2 August 2010 22:48, pipplo wrote: > Hey Everyone > > I'm new to RoR and this group so please let me know if I'm not being > descriptive enough, or if I'm asking questions when I should RTFM. > > I have a basic understanding of RoR, but I'm kinda missing the next > step for a web application I

[Rails] Re: ActiveRecord - find MySQL connection/thread ID for query

2010-08-03 Thread Marnen Laibow-Koser
Michaël wrote: > Hi, > > Is it possible, when using a find method with a Model, to record the > MySQL thread ID for the subsequent database query? Does ActiveRecord > expose this? Why on earth would you need this? What are you trying to achieve? > > Many thanks, > Micha�l Best, --  Marnen Lai

[Rails] ActiveRecord - find MySQL connection/thread ID for query

2010-08-03 Thread Michaël
Hi, Is it possible, when using a find method with a Model, to record the MySQL thread ID for the subsequent database query? Does ActiveRecord expose this? Many thanks, Michaël -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to t

Re: [Rails] Re: Drop down box in ruby

2010-08-03 Thread lucas franceschi
i didn't understand that... try to explain me some things... i would be pleased to help. so, you want a ComboBox that shows what? the values in the array? if it is so, you may want to populate this array in the controller, and iterate it in the view, adding values for each item in your array. ima

[Rails] Re: Drop down box in ruby

2010-08-03 Thread Chad Weier
> How would I get a select box to list > -minute > -hour -- 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 f

[Rails] Drop down box in ruby

2010-08-03 Thread Chad Weier
Hello I've only been playing with ruby and rails for a few short weeks, I have an class called time in my libs folder and I want to call an array from this class and populate a drop down box/select box in rails in one of my view pages. everything online is so confusing regarding this.. Just say

[Rails] Re: File creation in Rails

2010-08-03 Thread tonypm
To access files in rails, you can use the Ruby File Class http://ruby-doc.org/core/classes/File.html#M002579 You can put this into a method in the model. Then either call it specifically from the controller, or use an after_update callback to automatically create the file after the object has be

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

2010-08-03 Thread Huet
Hi All, I have had this problem with Rails 3 and 1.9.1. The fix for this error is to add to_a to the json call. render :json => {:top => @top.to_a.as_json(:only => [:id, :title ] ) } Hope this helps. Huet On Aug 3, 8:01 am, Conrad Taylor wrote: > On Mon, Aug 2, 2010 at 2:26 PM, wprater wrot

[Rails] Re: :url being ignored or routing problem?

2010-08-03 Thread Frederick Cheung
On Aug 2, 11:15 pm, suzuki wrote: > > troubleshooting > i'm looking at the log, and it seems to me that when i am at the > initial page (and surrounding pages), i am in the desired controller. > routing appears to be working as expected.  however, when i test my > drop-down menu, it appears as t

[Rails] Re: how to configure rails to use mysql by default (not sqlite3)

2010-08-03 Thread Kenneth    
just add -d mysql option when you create a new rails project -- 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

  1   2   >