[Rails] issue with the attachment_fu on sinatra with rails 3

2011-01-05 Thread Ganesh Kathare
Hello experts, As I've posted in my previous post that problem with attachement_fu on sinatra http://www.ruby-forum.com/topic/814969#972738 I need to upload an image from my local computer to a web server and store the location in a database using attachment_fu plugin Any ideas on how to get th

[Rails] problem with attachement_fu on sinatra

2011-01-05 Thread Ganesh Kathare
Hello experts, I am trying to user attachement_fu plugin on sinatra.. When I'm posting request on sinatra.. including file params then in log it showing posted params[:file] format in hash type.. like {"uploaded_data"=> {:filename=>"user.JPG", :type=>"image/jpeg", :name=>"custom_thumbna

[Rails] Re: Invalid argument - https://graph.facebook.com/19292868552

2011-01-05 Thread rajeevsharma86
May be a issue with open-uri Is some one face this error on server On Thu, Jan 6, 2011 at 12:46 PM, ashu wrote: > require 'rubygems' > require 'hpricot' > require 'open-uri' >doc = Hpricot(open("http://graph.facebook.com/226723089703";)) >@doc = doc.to_s.gsub(/"id.+?likes":/,"

[Rails] Invalid argument - https://graph.facebook.com/19292868552

2011-01-05 Thread ashu
require 'rubygems' require 'hpricot' require 'open-uri' doc = Hpricot(open("http://graph.facebook.com/226723089703";)) @doc = doc.to_s.gsub(/"id.+?likes":/,"").gsub("{","").gsub("}","") puts @doc OR require 'rubygems' require 'nokogiri' r

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

2011-01-05 Thread dare ruby
>> > Hi, do you see anything in the Rails or Passenger/Apache logs? > hi am using webrick & also mongrel. While using passanger it works fine in ipad, the videos are not played in ipad /iphone while using webrick / mongrel. Here is the logs Started GET "/videos/list" for 192.168.0.144 at W

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

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

[Rails] Re: HTML5 video not played in ipad

2011-01-05 Thread dare ruby
>> > > > Thanks ben your code works fine in my rails application. > > but when i try to change to change the video file path to read from my > server, it fails again in ipad / iphone alone but works fine in mac > safari. > > preload="auto" poster="http://video-js.zencoder.com/oceans-clip.png

[Rails] Re: Link_to parameters

2011-01-05 Thread Ar Chron
David Zhu wrote in post #972696: > Hello, > > I would like to have a link_to automatically populate a field in the > form that it is linking to. > > For example (excuse my silly words, im trying to make a point) > <%= link_to "Add a COOL Post", new_post_path, :howcoolisit => 'COOL' > %> > <%= link_

[Rails] Link_to parameters

2011-01-05 Thread David Zhu
Hello, I would like to have a link_to automatically populate a field in the form that it is linking to. For example (excuse my silly words, im trying to make a point) <%= link_to "Add a COOL Post", new_post_path, :howcoolisit => 'COOL' %> <%= link_to "Add a NOTCOOL Post", new_post_path, :howcooli

[Rails] [Rails 3] link_to_remote, no action

2011-01-05 Thread Me
The url in the link to remote below does not have the action in the url. Ideas? link_to_remote(comment.text, :url => {:controller=>'workshop_comments',:action=>'index',:id=>comment})) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To

Re: [Rails] Re: How to make this SQL Query?

2011-01-05 Thread Fernando Leandro
Thanks Fred, Well.. i could make it work... I dont know why, but it wastes about 25 seconds to give me query result... Is it normal? the number of registers its like 8000 for courses, 13000 for coursers_times and 400 for times.. It must have a better way to do this.. its a normal query... Thank

Re: [Rails] Best Practice

2011-01-05 Thread Rob Biedenharn
On Jan 5, 2011, at 5:21 PM, Colin Law wrote: On 5 January 2011 21:45, Brian Ablaza wrote: I have an app that manages tapes. Each tape has a number (separate from the record ID in MySQL). When a tape is added, the number field can be filled in. But when the record is subsequently edited, the

Re: [Rails] Re: Re: Re: Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Colin Law
On 5 January 2011 22:01, Daniel Oton wrote: >> Is form_form actually what you're typing?  It should be form_for . > > No, sorry. Only bad typped when writing the post... > >>I don't understand what you mean by form_for *inside* form_for.  Are >>you using nested forms? > > <% form_for(@item) do |f|

Re: [Rails] Best Practice

2011-01-05 Thread Colin Law
On 5 January 2011 21:45, Brian Ablaza wrote: > I have an app that manages tapes. Each tape has a number (separate from > the record ID in MySQL). > > When a tape is added, the number field can be filled in. But when the > record is subsequently edited, the number should not be editable. > > Both t

[Rails] Re: DIV partial update question

2011-01-05 Thread Marnen Laibow-Koser
Colin Law wrote in post #972635: > On 5 January 2011 20:51, Miros Malich wrote: >> Hello everybody >> >> I'm learning rails, buidling my first app and got stucked with one >> problem. >> >> I have some client model with institution select list. (Client >> belongs_to institution). Since I'm comming

[Rails] Re: Re: Re: Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Daniel Oton
> Is form_form actually what you're typing? It should be form_for . No, sorry. Only bad typped when writing the post... >I don't understand what you mean by form_for *inside* form_for. Are >you using nested forms? <% form_for(@item) do |f| %> <% form_for(@subitem) do |f| %> ... or something

Re: [Rails] DIV partial update question

2011-01-05 Thread Colin Law
On 5 January 2011 20:51, Miros Malich wrote: > Hello everybody > > I'm learning rails, buidling my first app and got stucked with one > problem. > > I have some client model with institution select list. (Client > belongs_to institution). Since I'm comming from desktop app world, I > would like to

[Rails] Re: Re: Re: Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Marnen Laibow-Koser
Colin Law wrote in post #972629: > On 5 January 2011 20:41, Daniel Oton wrote: >> >> All my forms in edit and new views are <% form_for ... >> >> Should be <%= form_form inside <% form_for ? Is form_form actually what you're typing? It should be form_for . Best, -- Marnen Laibow-Koser http://ww

[Rails] Re: Best Practice

2011-01-05 Thread Marnen Laibow-Koser
Brian Ablaza wrote in post #972628: > I have an app that manages tapes. Each tape has a number (separate from > the record ID in MySQL). > > When a tape is added, the number field can be filled in. But when the > record is subsequently edited, the number should not be editable. > > Both the "new" a

[Rails] Best Practice

2011-01-05 Thread Brian Ablaza
I have an app that manages tapes. Each tape has a number (separate from the record ID in MySQL). When a tape is added, the number field can be filled in. But when the record is subsequently edited, the number should not be editable. Both the "new" and "edit" views include (render) the same form p

Re: [Rails] Re: Re: Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Colin Law
On 5 January 2011 20:41, Daniel Oton wrote: >> As I asked before, please include the appropriate bits of the previous >> post in your message so that it makes sense.  As it stands this >> message will now make no sense to someone finding the thread in the >> future. > > Ok, I didn't know what you

Re: [Rails] Re: How to make this SQL Query?

2011-01-05 Thread Frederick Cheung
Should be other_times.day Sent from my iPhone On 5 Jan 2011, at 21:10, Fernando Leandro wrote: > Hum... i tried it.. but i always get this sql error > > #1054 - Unknown column 'other_times' in 'field list' > > do u know what can be that error? > > Thanks > > 2011/1/5 Frederick Cheung >

Re: [Rails] Re: How to make this SQL Query?

2011-01-05 Thread Fernando Leandro
Hum... i tried it.. but i always get this sql error #1054 - Unknown column 'other_times' in 'field list' do u know what can be that error? Thanks 2011/1/5 Frederick Cheung > > > On Jan 5, 8:31 pm, Fernando Leandro > wrote: > > djangst, > > > > hum but actually in my database it occurs..

[Rails] Re: DIV partial update question

2011-01-05 Thread Marnen Laibow-Koser
Miros Malich wrote in post #972621: > Hello everybody > > I'm learning rails, buidling my first app and got stucked with one > problem. > > I have some client model with institution select list. (Client > belongs_to institution). Since I'm comming from desktop app world, [...] That's sort of a bad

[Rails] DIV partial update question

2011-01-05 Thread Miros Malich
Hello everybody I'm learning rails, buidling my first app and got stucked with one problem. I have some client model with institution select list. (Client belongs_to institution). Since I'm comming from desktop app world, I would like to build function for user to add new institution and refresh

[Rails] Re: How to make this SQL Query?

2011-01-05 Thread Frederick Cheung
On Jan 5, 8:31 pm, Fernando Leandro wrote: > djangst, > > hum but actually in my database it occurs... that are some coursers that > have two times that reffers to the same day (because actually in my db, time > has the hour too, not only the day) > > but, using Fred`s example, i would have

[Rails] Re: Re: Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Daniel Oton
> As I asked before, please include the appropriate bits of the previous > post in your message so that it makes sense. As it stands this > message will now make no sense to someone finding the thread in the > future. Ok, I didn't know what you were meaning... :-) > Did you find that <%= form_fo

Re: [Rails] Re: How to make this SQL Query?

2011-01-05 Thread Fernando Leandro
djangst, hum but actually in my database it occurs... that are some coursers that have two times that reffers to the same day (because actually in my db, time has the hour too, not only the day) but, using Fred`s example, i would have to make a select in the courses and use that another sele

Re: [Rails] Re: Can't POST using Ruby 1.9.2 -- get Apache error.

2011-01-05 Thread Paul
I was about to try a blank test program, too. I haven't had time to let the server be down at the moment, so I backed down to 1.8.7 too. I understand that 1.9.2 has much better performance, though, so I'd really like to get it to work. Can someone who is successfully using CentOS/Apache/Passenger/

[Rails] Re: How to make this SQL Query?

2011-01-05 Thread djangst
Check out Fred's earlier example. Using the count of courses with only one courses_times row in conjunction with the having clause you can filter out courses scheduled on more than one day. The only potential problem I could foresee with this would be if a course could be scheduled for multiple ti

[Rails] Re: Rails 3.0.3 - can't render in json

2011-01-05 Thread Milo Thurston
Thanks for your replies. I've tested it with curl and I get the same result, even after setting the headers correctly as mentioned above. Originally I thought that I'd made an error with my curl configuration, but it appears that that is not the case. curl -i -X POST -H 'Content-Type: applicat

Re: [Rails] Re: How to make this SQL Query?

2011-01-05 Thread Fernando Leandro
djangst, yes.. its exactly this... but how can i do that in another way? Thanks 2011/1/5 djangst > I think your subquery may be too complex. Don't you just want to > select ids from Times where the day isn't 'Monday' and use that set as > the filter on the top-level query? > > On Jan 5, 1:35 p

Re: [Rails] Re: Re: Re: How to make this SQL Query?

2011-01-05 Thread Jatin kumar
On Wed, Jan 5, 2011 at 6:40 PM, Marnen Laibow-Koser wrote: > Jatin Kumar wrote in post #972585: > > On Wed, Jan 5, 2011 at 6:10 PM, Marnen Laibow-Koser > > wrote: > > > >> > >> I didn't mean to use raw SQL *instead of* ActiveRecord. But sometimes > >> ActiveRecord's abstractions aren't terribly g

[Rails] Re: How to make this SQL Query?

2011-01-05 Thread djangst
I think your subquery may be too complex. Don't you just want to select ids from Times where the day isn't 'Monday' and use that set as the filter on the top-level query? On Jan 5, 1:35 pm, Fernando Leandro wrote: > Actually, i tried to make this query using NOT IN, i made something like > this:

[Rails] Re: Re: Re: How to make this SQL Query?

2011-01-05 Thread Marnen Laibow-Koser
Jatin Kumar wrote in post #972585: > On Wed, Jan 5, 2011 at 6:10 PM, Marnen Laibow-Koser > wrote: > >> >> I didn't mean to use raw SQL *instead of* ActiveRecord. But sometimes >> ActiveRecord's abstractions aren't terribly good > > (notably with bulk and >> aggregate operations, as well as certain

Re: [Rails] Re: How to make this SQL Query?

2011-01-05 Thread Fernando Leandro
Actually, i tried to make this query using NOT IN, i made something like this: SELECT courses.* FROM courses INNER JOIN courses_times ON courses_times.course_id = courses.id INNER JOIN times ON courses_times.time_id = times.id where courses.id NOT IN ( SELECT courses.id FROM courses

[Rails] Re: How to make this SQL Query?

2011-01-05 Thread Frederick Cheung
On Jan 5, 5:38 pm, Fernando Leandro wrote: > When i use a query like above, for example, it returns to me all the courses > that have association with Monday, > it returns Math, Chimestry and History, and i would like to receive just > History > > I know that this question is not about rails bu

Re: [Rails] Re: Re: How to make this SQL Query?

2011-01-05 Thread Jatin kumar
On Wed, Jan 5, 2011 at 6:10 PM, Marnen Laibow-Koser wrote: > Jatin Kumar wrote in post #972576: > > On Wed, Jan 5, 2011 at 5:50 PM, Marnen Laibow-Koser > > wrote: > > > >> > > >> certain operations. > >> > >> Could you name some of these certain operations where its better to go > for > > SQL quer

[Rails] Re: Re: How to make this SQL Query?

2011-01-05 Thread Marnen Laibow-Koser
Jatin Kumar wrote in post #972576: > On Wed, Jan 5, 2011 at 5:50 PM, Marnen Laibow-Koser > wrote: > >> > >> certain operations. >> >> Could you name some of these certain operations where its better to go for > SQL queries instead of ActiveRecord. I didn't mean to use raw SQL *instead of* ActiveRe

[Rails] Re: How to make this SQL Query?

2011-01-05 Thread djangst
It sounds like you want a "NOT IN" subquery. On Jan 5, 12:38 pm, Fernando Leandro wrote: > I have 3 tables: courses, times and courses_times -- 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 rubyonrail

[Rails] Re: Validations issue

2011-01-05 Thread Marnen Laibow-Koser
Finne Jager wrote in post #972574: [...] >> Do your tests that check that the validations on CommandOfficer work >> correctly pass ok? >> >> Colin > > I haven't learned much about tests yet and haven't used them so far. ...and now you know why you must -- it's hard to tell what isn't working if y

Re: [Rails] Re: How to make this SQL Query?

2011-01-05 Thread Jatin kumar
On Wed, Jan 5, 2011 at 5:50 PM, Marnen Laibow-Koser wrote: > Colin Law wrote in post #972572: > > On 5 January 2011 17:38, Fernando Leandro > > wrote: > >> > >> > >> FROM courses > >> > >> I know that this question is not about rails but i need to solve this > >> problem to continue my rails app,

[Rails] Re: Validations issue

2011-01-05 Thread Finne Jager
Colin Law wrote in post #972568: > On 5 January 2011 17:22, Finne Jager wrote: >>format.html { redirect_to(edit_incident_timesheet_path, :notice >> => 'Could not save Command Officer.') } >> >> >> Now when I enter 'aaa' in the Rate field and submit, the record DOES NOT >> get saved to the data

[Rails] Re: How to make this SQL Query?

2011-01-05 Thread Marnen Laibow-Koser
Colin Law wrote in post #972572: > On 5 January 2011 17:38, Fernando Leandro > wrote: >> >> >> FROM courses >> >> I know that this question is not about rails but i need to solve this >> problem to continue my rails app, >> and i would appreciate if someone could help me.. > > You can make it a Ra

Re: [Rails] How to make this SQL Query?

2011-01-05 Thread Colin Law
On 5 January 2011 17:38, Fernando Leandro wrote: > Hello guys, > > I have a problem with how to do a sql query. > > I have 3 tables: courses, times and courses_times > > So for example, if i have the following data: > >  Courses   courses_times       Times > id  |   nam

[Rails] How to make this SQL Query?

2011-01-05 Thread Fernando Leandro
Hello guys, I have a problem with how to do a sql query. I have 3 tables: courses, times and courses_times So for example, if i have the following data: Courses courses_times Times id | name course_id | time_idid | day 1 |

Re: [Rails] Validations issue

2011-01-05 Thread Colin Law
On 5 January 2011 17:22, Finne Jager wrote: > I have this validation in my model: > > validates :name, :rate, :presence => true, :numericality => true > > In my Controller#create method I have: > > if @timesheet.create_command_officer(params[:command_officer]) >        format.html { redirect_to(ed

[Rails] Re: Update XML file from another XML file

2011-01-05 Thread Robert Walker
Paul Osborne wrote in post #972462: > I have a Shopify store, which I can access my products.xml feed through > the API, Shopify feed sample attached. > > I have another feed from the wholesaler I use that has the latest stock > levels. Whole feed sample attached. > > The common link between the tw

[Rails] Re: Rails 3.0.3 - can't render in json

2011-01-05 Thread djangst
How about testing with curl, like: curl -H "Accept: application/json" http://127.0.0.1:3000/jobs.json On Jan 5, 12:10 pm, Milo Thurston wrote: > I've found a strange (to me) response from rails if I try to render > output as json, whereas xml is fine. -- You received this message because you a

[Rails] Validations issue

2011-01-05 Thread Finne Jager
I have this validation in my model: validates :name, :rate, :presence => true, :numericality => true In my Controller#create method I have: if @timesheet.create_command_officer(params[:command_officer]) format.html { redirect_to(edit_incident_timesheet_path, :notice => 'Command officer w

[Rails] Re: rvm and phusion passenger

2011-01-05 Thread Jeff Lewis
Hi Tom, If you are or can run passenger 3.x, then you can use passenger- standalone proxy'd via apache to handle multiple / different ruby/ rails combinations. Check out http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/ "One of the questions we’ve been getting

[Rails] Re: Rails 3.0.3 - can't render in json

2011-01-05 Thread Frederick Cheung
On Jan 5, 5:10 pm, Milo Thurston wrote: > I've found a strange (to me) response from rails if I try to render > output as json, whereas xml is fine. From the logs. For example, here > are the logs for a simple query (from the browser) to list all "jobs": > Probably because the browser has indica

[Rails] Rails 3.0.3 - can't render in json

2011-01-05 Thread Milo Thurston
I've found a strange (to me) response from rails if I try to render output as json, whereas xml is fine. From the logs. For example, here are the logs for a simple query (from the browser) to list all "jobs": Started GET "/jobs.json" for 127.0.0.1 at 2011-01-05 16:44:45 + Processing by Jobs

[Rails] Rails, Advanced Email Processing

2011-01-05 Thread UA
Hi, we got a project with extensive requirements to trigger events based on incoming emails on a rails platform. We need to reach each incoming email, parse it and trigger logic based on it. Has anyone ever worked on such a system? 1) Do you know any books / resources / etc which explicitly elabor

Re: [Rails] Re: Custom response headers

2011-01-05 Thread Frederick Cheung
On 5 Jan 2011, at 15:42, Xornor wrote: > >> >> > > Curl was used in the same server (Ubuntu) as application is executed. > Firefox was running in the another computer. > > I made changes directly to the application which was running in the > server. The server is in "production". > Dumb que

Re: [Rails] Finding the previous / next item

2011-01-05 Thread Hassan Schroeder
On Wed, Jan 5, 2011 at 5:28 AM, bourne wrote: > Given one model with a more complex sort in it. > @products = Product.all > > If I now have the ID of a product that is in @products - what is the best > way to find the previous/next element (keeping the model sort in mind, e.g. > the previous / nex

Re: [Rails] rake cucumber aborts after successfull feature scenarios

2011-01-05 Thread Colin Law
On 5 January 2011 15:15, Rolf Pedersen wrote: > Ok - thanks, Colin > > But it looks to me like Cucumber finishes nicely by reporting the successful > scenarios (in this case only one): > (::) passed scenarios (::) > > features\showtime_descriptions.feature:8:in `Scenario: Show minutes for > times

[Rails] Re: Custom response headers

2011-01-05 Thread Xornor
On 5 tammi, 15:15, Walter Lee Davis wrote: > On Jan 5, 2011, at 3:22 AM, Xornor wrote: > > > > >> That looks like it should work (I don't think that an after filter is > >> 'too late' to set headers). How are you testing that the headers > >> aren't there? > > >> Fred > > > I checked headers wit

[Rails] Re: undefined method `model_name' for ActiveRecord::Relation:Class

2011-01-05 Thread John Cowan
Thanks for looking at my problem. I hope this is what you need. I am using a named_scope (or just scope - rails 3): scope :students_enrolled_in_course, lambda { |*args| { :conditions => ["crs_key > ? AND final_gr IS NOT NULL AND

[Rails] Re: undefined method `model_name' for ActiveRecord::Relation:Class

2011-01-05 Thread Tim Shaffer
Can you show the code for the *CourseTaken.students_enrolled_in_course*method? -- 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 em

Re: [Rails] rake cucumber aborts after successfull feature scenarios

2011-01-05 Thread Rolf Pedersen
Ok - thanks, Colin But it looks to me like Cucumber finishes nicely by reporting the successful scenarios (in this case only one): (::) passed scenarios (::) features\showtime_descriptions.feature:8:in `Scenario: Show minutes for times not ending with 00' But there is something going on after it

[Rails] undefined method `model_name' for ActiveRecord::Relation:Class

2011-01-05 Thread John Cowan
Greetings, I'm trying to create a spreadsheet using ekuseru. I have a form that a user enters a course number in and submits. Like 'HA2211'. The action in my controller this goes to is course_enrollment. The view is course_enrollment.xls.eku. My controller: (in part) class Sso::ReportsControll

[Rails] Re: Help with div ...

2011-01-05 Thread shungite
Thanks for that! It's your second case that applies to my problem, so I'm off to work on your suggestions. Of the seemingly hundreds of tutorials I had seen, I had not come across the one you mention, which looks good. Also, one of the jquery tutorials just about does what I want, so I plan to try

Re: [Rails] Re: Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Colin Law
On 5 January 2011 13:40, Daniel Oton wrote: > Finally, I have used tinyMCE using the following link: > https://github.com/kete/tiny_mce > > It has a gem version too! :-) Did you find that <%= form_for is now working for you? Colin -- You received this message because you are subscribed to the

Re: [Rails] rake cucumber aborts after successfull feature scenarios

2011-01-05 Thread Colin Law
On 5 January 2011 13:18, Rolf Pedersen wrote: > How so, Colin? > I guess the use of backslash is just the way Cucumber reports for the > feature, since I'm using Windows... I don't know (I was just pointing out the possible issue). I noticed that the failure is in the area of this line and it is

[Rails] Re: find_or_create : how to know the resulting operation ?

2011-01-05 Thread Tim Shaffer
With find_or_create, I don't believe there is a way. You can certainly do it with find_or_initialize winter = Tag.find_or_initialize_by_name("Winter") winter.persisted? # true if record exists, false if it does not -- You received this message because you are subscribed to the Google Groups "R

[Rails] Re: Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Daniel Oton
Finally, I have used tinyMCE using the following link: https://github.com/kete/tiny_mce It has a gem version too! :-) Thanks! -- 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 gr

Re: [Rails] Re: Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Colin Law
On 5 January 2011 11:53, Daniel Oton wrote: As I asked before, please include the appropriate bits of the previous post in your message so that it makes sense. As it stands this message will now make no sense to someone finding the thread in the future. > I pasted the wrong code... Sorry. > > I

Re: [Rails] error

2011-01-05 Thread Colin Law
On 5 January 2011 07:31, bunty wrote: > <%= distance_of_time_in_words(post.created_at, Time.now) %> > > gives {{count}} Are you using internationalisation? If so then I would look in that direction. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on R

[Rails] Re: rvm and phusion passenger

2011-01-05 Thread Robert Pankowecki (rupert)
It is not possible. I think that you must use passenger + passenger lite Robert Pankowecki http://robert.pankowecki.pl -- 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.co

[Rails] Finding the previous / next item

2011-01-05 Thread bourne
Given one model with a more complex sort in it. @products = Product.all If I now have the ID of a product that is in @products - what is the best way to find the previous/next element (keeping the model sort in mind, e.g. the previous / next with respect to the custom sort, not with respect to

Re: [Rails] rake cucumber aborts after successfull feature scenarios

2011-01-05 Thread Rolf Pedersen
How so, Colin? I guess the use of backslash is just the way Cucumber reports for the feature, since I'm using Windows... -Rolf On Wed, Jan 5, 2011 at 12:28 PM, Colin Law wrote: > On 5 January 2011 11:21, Rolf Pedersen wrote: > > Hi > > > > rake cucumber:wip aborts with error messages after suc

Re: [Rails] Re: Custom response headers

2011-01-05 Thread Walter Lee Davis
On Jan 5, 2011, at 3:22 AM, Xornor wrote: That looks like it should work (I don't think that an after filter is 'too late' to set headers). How are you testing that the headers aren't there? Fred I checked headers with two separate methods, by sending HTTP request with curl and -i option a

[Rails] rvm and phusion passenger

2011-01-05 Thread Tom Mac
I have two rails applications currently running on systemruby which is version 1.8.6. And I am using phusion passenger with apache to run the applications. My new requirement is to run one of the applications in Ruby1.8.7. For that I have set up 1.8.7 with RVM. But I dont know how to modify my exis

[Rails] Re: Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Daniel Oton
I don't know if I understood you correctly... Any idea? Thanks -- 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 unsubs

[Rails] ajax history.

2011-01-05 Thread Mauro
There is someone that has worked with ajax history? I've followed http://railscasts.com/episodes/175-ajax-history-and-bookmarks but it seems that the new javascript api history.pushState doesn't work as well as jquery.ba-bbq.js -- You received this message because you are subscribed to the Google

[Rails] Problem with render :partial - jruby 1.5.6

2011-01-05 Thread Danilo Castilho
Re-changing the subject... When complaining about others, please don't do the same. Now let's go back to the important part of this topic, please. On Jan 5, 10:39 pm, Colin Law wrote: > On 5 January 2011 11:26, Danilo Castilho wrote: > > > Hey guys, > > Just "upgraded" from ruby 1.8.7 to jruby 1

[Rails] cucumber stories for Ajax in rails3

2011-01-05 Thread Mallikarjun rao
how can we manage the cucumber stories for Ajax for rails3 -- 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 rubyonrails-

[Rails] error

2011-01-05 Thread bunty
<%= distance_of_time_in_words(post.created_at, Time.now) %> gives {{count}} -- 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 emai

[Rails] Re: Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Daniel Oton
I pasted the wrong code... Sorry. It should be: View Code: <% form_for(@item) do |f| %> <%= f.error_messages %> <%= f.label :title %><%= f.text_field :title %> <%= f.label :description %><%= f.rich_text_area :description %> <%= f.submit 'Create' %> <% end %> -- Posted via http://www.ru

[Rails] Re: Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Daniel Oton
I pasted the wrong code... Sorry. It should be: View Code: <%= form_for(@item) do |f| %> <%= f.error_messages %> <%= f.label :title %><%= f.text_field :title %> <%= f.label :description %><%= f.rich_text_area :description %> <%= f.submit 'Create' %> <% end %> -- Posted via http://www.r

[Rails] Update XML file from another XML file

2011-01-05 Thread Paul Osborne
Hi, I'm new to Ruby and Rails and trying to use it to work on a project for my website. I have a Shopify store, which I can access my products.xml feed through the API, Shopify feed sample attached. I have another feed from the wholesaler I use that has the latest stock levels. Whole feed sample

[Rails] Re: How to set Sender Name in the From: header in Action Mai

2011-01-05 Thread Nimesh Nikum
I changed delivery method to :sendmail and it started to work for me :-) ActionMailer::Base.delivery_method = :sendmail I hope it helps to you also :-) -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk"

Re: [Rails] Abridged summary of rubyonrails-talk@googlegroups.com - 67 Messages in 25 Topics

2011-01-05 Thread Colin Law
On 5 January 2011 11:26, Danilo Castilho wrote: > Hey guys, > Just "upgraded" from ruby 1.8.7 to jruby 1.5.6, with my application and > rails 3.0.3 unchanged during the "upgrade". Partials are not being rendered > anymore (see below). Anyone has a clue on what's happening? (tried webrick > and gla

Re: [Rails] Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Colin Law
On 5 January 2011 11:25, Daniel Oton wrote: > I tried withe <%= form_form, as you told me, and I have compile error > (and nothing else of course) Please quote the previous reply so the thread is easier to understand. > > If I use <% form_form, I have no compilation error and the html code. But

[Rails] Problem with render :partial - jruby 1.5.6

2011-01-05 Thread Danilo Castilho
It would be good if someone could edit the subject of this topic... That was a mistake. -- 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

[Rails] Can't Dup NilClass

2011-01-05 Thread Commander Johnson
Hello, I put the method below in my controller, but I feel it should be in my Billing::Shared module so it can be used by other controllers as well. However, this introduces the Can't Dup NilClass message when running a server in development mode. Do you have any suggestions how I can DRY this c

Re: [Rails] rake cucumber aborts after successfull feature scenarios

2011-01-05 Thread Colin Law
On 5 January 2011 11:21, Rolf Pedersen wrote: > Hi > > rake cucumber:wip aborts with error messages after successfully running > feature scenarios. > ... > >   @wip >   Scenario: Show minutes for times not ending with 00   # > features\showtime_descriptions.feature:8 >     Given a

Re: [Rails] Abridged summary of rubyonrails-talk@googlegroups.com - 67 Messages in 25 Topics

2011-01-05 Thread Danilo Castilho
Hey guys, Just "upgraded" from ruby 1.8.7 to jruby 1.5.6, with my application and rails 3.0.3 unchanged during the "upgrade". Partials are not being rendered anymore (see below). Anyone has a clue on what's happening? (tried webrick and glassfish, no change) undefined method `to_sym' for nil:Nil

[Rails] Re: Re: Nicedit (rich text editor)

2011-01-05 Thread Daniel Oton
I tried withe <%= form_form, as you told me, and I have compile error (and nothing else of course) If I use <% form_form, I have no compilation error and the html code. Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Grou

[Rails] rake cucumber aborts after successfull feature scenarios

2011-01-05 Thread Rolf Pedersen
Hi rake cucumber:wip aborts with error messages after successfully running feature scenarios. Platform: Windows XP Ruby version: ruby 1.9.2p0 (2010-08-18) [i386-mingw32] Relevant gems in bundle: * bundler (1.0.7) * cucumber (0.10.0) * cucumber-rails (0.3.2) * gherkin (2.3.3) * rails (

Re: [Rails] Re: Nicedit (rich text editor)

2011-01-05 Thread Colin Law
On 5 January 2011 11:04, Daniel Oton wrote: > Thanks for your response. > > If I use <%= form_for... It breaks > ActionView::TemplateError (compile error > /home/fydserve/intraweb/app/views/items/new.html.erb:5: syntax error, > unexpected ')' > ...(( form_for(@item) do |f| ).to_s); @output_buffer.

[Rails] Re: Nicedit (rich text editor)

2011-01-05 Thread Daniel Oton
Thanks for your response. If I use <%= form_for... It breaks ActionView::TemplateError (compile error /home/fydserve/intraweb/app/views/items/new.html.erb:5: syntax error, unexpected ')' ...(( form_for(@item) do |f| ).to_s); @output_buffer.concat ... ^ /home/fydserve

Re: [Rails] Nicedit (rich text editor)

2011-01-05 Thread Colin Law
On 5 January 2011 10:21, Daniel Oton wrote: > Hello, I'm trying to use Nicedit to improve my text_areas in some views > of my project. > > I have installed jquery: > ruby script/plugin install git://github.com/aaronchi/jrails.git > > nicEdit plugin: > ruby script/plugin install > git://github.com/

[Rails] Nicedit (rich text editor)

2011-01-05 Thread Daniel Oton
Hello, I'm trying to use Nicedit to improve my text_areas in some views of my project. I have installed jquery: ruby script/plugin install git://github.com/aaronchi/jrails.git nicEdit plugin: ruby script/plugin install git://github.com/sergio-fry/Simple-nicEdit.git Add js in layout: <%= javascri

Re: [Rails] Re: Get a value from previous page

2011-01-05 Thread Colin Law
On 5 January 2011 01:03, Jose tomas R. wrote: > i need something like this > > index.html.erb > > <%= link_to 'cost', :action => 'search', :order => 'cost' > %> > > cars_controller.rb > >  def search >   �...@order = :order Look in the log file (development.log assuming you are in development mod

[Rails] find_or_create : how to know the resulting operation ?

2011-01-05 Thread Fabrice Fabrisss
hello, find_or_create_by has a different behaviour according to the existence of the instance in the database, is it possible to know the resulting operation (find or create) which has been actually executed ? thank you, Fabrice -- Posted via http://www.ruby-forum.com/. -- You received this

[Rails] Re: Problems with ActiveRecord after certain amount of columns in table

2011-01-05 Thread Daniel Garcia
@Fred Problem solved.Switched to mysql 5.1 and now I get things as I want them. @Marnen Laibow-Koser Again thank you for the patience.Your inquiring about my on screen results helped others to relate the issue. -- Posted via http://www.ruby-forum.com/. -- You received this message because you

[Rails] Re: Custom response headers

2011-01-05 Thread Xornor
> That looks like it should work (I don't think that an after filter is > 'too late' to set headers). How are you testing that the headers > aren't there? > > Fred I checked headers with two separate methods, by sending HTTP request with curl and -i option and also with Firefox Live HTTP headers