[Rails] Re: ROR3.beta4 on ubuntu10.04 error

2010-06-09 Thread Yiling Cao
btw my ruby version is 1.9.1 ruby -v ruby 1.9.1p378 (2010-01-10 revision 26273) [i486-linux] -- 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] ROR3.beta4 on ubuntu10.04 error

2010-06-09 Thread Yiling Cao
hi, im trying to experiment a rails3 on my ubuntu10.04 32bit, with installation guide from rails official website have installed all packages, when i try to run script/rails server it showed my following errors: r...@c2h2vaio:~/a# script/rails s /root/a/config/boot.rb:9:in `rescue in ': uninit

[Rails] Re: Showing youtube video

2010-06-09 Thread Tushar Gandhi
Hi, I have one problem. How can I get the video thumbnails like what we will see on youtube on right side? Thanks, Tushar Tushar Gandhi wrote: > Thanks Saurabh. > It is working fine. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] Re: Showing youtube video

2010-06-09 Thread Tushar Gandhi
Thanks Saurabh. It is working fine. -- 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 em

[Rails] Re: Showing youtube video

2010-06-09 Thread Saurabh Peshkar
Tushar Gandhi wrote: > Hi, > I want to build an functionality by which user will add the youtube > video link into my app. After that he/she should be able to see the > video in my application. > Like in facebook you can add the video link and that video will be shown > into facebook with the video

[Rails] Re: db connection issues in production but not in dev mode

2010-06-09 Thread Yani Yen
Hi, my postgreSQl error went by changing the postgres adapter to 8.3.604.. 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...@google

[Rails] Showing youtube video

2010-06-09 Thread Tushar Gandhi
Hi, I want to build an functionality by which user will add the youtube video link into my app. After that he/she should be able to see the video in my application. Like in facebook you can add the video link and that video will be shown into facebook with the video's image and name. Can anyone te

[Rails] Rails3 beta4 + Ruby 1.9

2010-06-09 Thread Greg Donald
When I try rails console using Rails3 beta4 and Ruby 1.9.1-p378 I cannot save a record: > rails console Loading development environment (Rails 3.0.0.beta4) ruby-1.9.1-p378 > g = Game.new => # ruby-1.9.1-p378 > g.save NameError: undefined method `<=>' for class `ActiveSupport::Multibyte::Chars' I

Re: [Rails] Mac OS/X and Rails 3 ?

2010-06-09 Thread Niels Meersschaert
Simplest way: Make you are up to date with rubygems, which is what DHH was referring to with gem update --system Then run: gem install rails --pre If you are NOT using RVM, add sudo in front of each of those. Niels On Jun 4, 2010, at 6:04 PM, Audrey Lee wrote: > Hello List, > > Label me

[Rails] Re: check_box_tag problems

2010-06-09 Thread Marnen Laibow-Koser
Sindri Guðmundsson wrote: > If this helps these are the parameters passed when I use check_box: > > > Parameters: {"commit"=>"Vista mælitæki", > "authenticity_token"=>"B2u5ULNr7IJ/ta0+hiAMBjmjEtTtc/yMAQQvSxFn2d0=", > "cats"=>{"flokkur"=>[nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, > ni

[Rails] Re: Using partials with XML builder, what's the right way?

2010-06-09 Thread Marnen Laibow-Koser
Matthew Hillsborough wrote: > Hello everyone, > > Partials in XML builder are proving to be non-trivial. So use Haml instead of Builder -- it works just as well for XML as for HTML. Problem solved. IMHO, Builder is the single most pointless thing in the Rails ecosystem. Best, -- Marnen Laibow

[Rails] Using partials with XML builder, what's the right way?

2010-06-09 Thread Matthew Hillsborough
Hello everyone, Partials in XML builder are proving to be non-trivial. After some initial Google searching, I found the following to work, although it's not 100% xml.foo do xml.id(foo.id) xml.created_at(foo.created_at) xml.last_updated(foo.updated_at) foo

[Rails] Re: How do I set session_id cookies securely on an http page?

2010-06-09 Thread Skye Weir-Mathews
The thing that is confusing me is that, I have the :secure session_option set, but when I go to an insecure page the Set-Cookie _session_id header is passed to me, and this appears to be replacing the _session_id cookie I got when I was on the secure page. Both secure and insecure pages are sen

[Rails] Re: Re: Re: Re: ERROR NoMethodError: private method `gsub!' called

2010-06-09 Thread Michael Pitman
Chris Mentch wrote: >>> >>> Well, I executed "gem install mongrel", then "ruby script/server >>> webrick" and everything is loading!! >> >> I presume you mean "ruby script/server mongrel" >> >> Colin > > > Yes... Sorry. Webrick still on the mind. > > ruby script/server mongrel > > Works! To

[Rails] strange problem:no such file to load -- no kogiri on rails3

2010-06-09 Thread Martin Han
I am test the script named test.rb by command "ruby test.rb" and it pass. Then i converte it as rake task. The rake task pass on rails 2.3.4 but fail on rails 3 beta4 with error msg: "no such file to load -- nokogiri" env :rails 3 beta4, ruby 1.8.7, ubuntu

Re: [Rails] Ruby DateTime arithmetic question

2010-06-09 Thread Bill Walton
Hi Clay, On Wed, Jun 9, 2010 at 6:34 PM, Clay H. wrote: > I'm thinking to loop through the file and convert each time stamp to a > DateTime with something like: > ... > require 'date' > ... > previous = DateTime.strptime(thefile[i-1][1], "%m/%d/%Y %H:%M") > current = DateTime.strptime(thefile[i]

[Rails] Re: Rails + Authlogic + OpenID

2010-06-09 Thread Todd Sedano
try the following: a) gem install ruby-openid-apps-discovery b) Modify config/environment.erb and add this line require 'gapps_openid' I wrote a blogpost about what I went through to get open-id to work with google: http://toddsedano.blogspot.com/ I'm now in the process of integrating my code wi

[Rails] Ruby DateTime arithmetic question

2010-06-09 Thread Clay H.
I have ~ 200,000 rows in a csv file that I need to parse. They are time stamped and are supposed to all be 10 minutes apart from each other. The format of the file is: ... 1,05/31/2006 18:08,101 1,05/31/2006 18:18,102 1,05/31/2006 18:28,103 1,05/31/2006 18:38,101 1,05/31/2006 18:48,101 1,05/31/2006

[Rails] Re: check_box_tag problems

2010-06-09 Thread Sindri Guðmundsson
If this helps these are the parameters passed when I use check_box: Parameters: {"commit"=>"Vista mælitæki", "authenticity_token"=>"B2u5ULNr7IJ/ta0+hiAMBjmjEtTtc/yMAQQvSxFn2d0=", "cats"=>{"flokkur"=>[nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ni

[Rails] Re: check_box_tag problems

2010-06-09 Thread Sindri Guðmundsson
Marnen Laibow-Koser wrote: > Sindri Guðmundsson wrote: >> Marnen Laibow-Koser wrote: >>> [...] >>> >>> This is strange code. You're inside a form_for, so why are you using >>> check_box_tag rather than check_box ? >> >> I read somewhere that I shouldn't do it like this, but I couldn't get >> t

[Rails] Re: get a marker

2010-06-09 Thread Marnen Laibow-Koser
badnaam wrote: > Is there a way to get a marker by its ID from a markergroup? > > I would like to pan the map to a specific marker's lat/lng when a link > is clicked, but i dont want to use showmarker because it opens the > info window How does this relate to Rails? What are markers and markergr

[Rails] Re: check_box_tag problems

2010-06-09 Thread Marnen Laibow-Koser
Sindri Guðmundsson wrote: > Marnen Laibow-Koser wrote: >> [...] >> >> This is strange code. You're inside a form_for, so why are you using >> check_box_tag rather than check_box ? > > I read somewhere that I shouldn't do it like this, but I couldn't get > the info on checked/uncecked using che

[Rails] Re: check_box_tag problems

2010-06-09 Thread Sindri Guðmundsson
Marnen Laibow-Koser wrote: > [...] > > This is strange code. You're inside a form_for, so why are you using > check_box_tag rather than check_box ? I read somewhere that I shouldn't do it like this, but I couldn't get the info on checked/uncecked using check_box. Should I get rid of the form_

[Rails] Re: Widget

2010-06-09 Thread Perry Smith
Jeremy Axman wrote: > I am very new to Ruby. > > > Is there a way to create a Windows Widget that resides on a desktop and > allows direct access to a database.. > > For instance > > I can enter name and email on my desktop and hit submit. It will then be > directed to an existing database? >

[Rails] Re: LoadError: no such file to load -- gem not found in irb, but found in app console

2010-06-09 Thread Perry Smith
Kad Kerforn wrote: > no problem in the console > $ script/console > Loading development environment (Rails 2.3.8) >>> require 'vzaar' > => [] > > but when using irb, I get a LoadError... > re 'vzaar' > LoadError: no such file to load -- vzaar > from (irb):1:in `require' > from (irb):1 > > wh

[Rails] get a marker

2010-06-09 Thread badnaam
Is there a way to get a marker by its ID from a markergroup? I would like to pan the map to a specific marker's lat/lng when a link is clicked, but i dont want to use showmarker because it opens the info window Thanks -- You received this message because you are subscribed to the Google Groups

[Rails] Persistent values and class variables

2010-06-09 Thread Perry Smith
I need to have a variable that points to a MemCache instance so I looked at the Rails caching code to see how they do it. They use a Ruby class variable (or a few of them). That surprised me since class variables in Ruby as so gnarly. I thought I would post the question here to see if anyone kne

[Rails] LoadError: no such file to load -- gem not found in irb, but found in app console

2010-06-09 Thread Erwin
I installed a gem (sudo gem install vzaar) , which is listed now in the gem list : ... gem list rubyist-aasm (2.1.1) SystemTimer (1.2) vzaar (0.2.2.1) xml-simple (1.0.12) in my app I am using this gem, without any problem class Academy::PagesController < ApplicationController require 'hprico

[Rails] Widget

2010-06-09 Thread Jeremy Axman
I am very new to Ruby. Is there a way to create a Windows Widget that resides on a desktop and allows direct access to a database.. For instance I can enter name and email on my desktop and hit submit. It will then be directed to an existing database? I am trying to create a email database wit

[Rails] Re: Getting Parameter when Form_for is Submitted

2010-06-09 Thread anon_comp
On Jun 9, 2:41 pm, anon_comp wrote: > This is slightly tied with my previous post. I wasn't sure if I was > supposed to make another message in there, so I made a new post. > > So in my previous post I accidentally asked a pure ruby question about > gsub which I'll be using in this question. > > A

[Rails] Re: check_box_tag problems

2010-06-09 Thread Marnen Laibow-Koser
Sindri Guðmundsson wrote: > Hi, > I'm having some trouble with my form. The thing is I'm using a loop to > generate check_box_tags and then when the user clicks submit I want to > be able to see what he checked. For each checked box I want to copy a > file to the corresponding directory. > > Here'

[Rails] Getting Parameter when Form_for is Submitted

2010-06-09 Thread anon_comp
This is slightly tied with my previous post. I wasn't sure if I was supposed to make another message in there, so I made a new post. So in my previous post I accidentally asked a pure ruby question about gsub which I'll be using in this question. Anyways, what I want to do is to take a single par

[Rails] Re: Join types

2010-06-09 Thread Marnen Laibow-Koser
JohnnyC wrote: > I'm sure this is not a new topic -- I've read mention of it elsewhere > -- but in addition to :joins => :profile, Active Record also > needs :inner_joins => :profile, :outer_joins => :profile, :left_joins > => :profile, and all the popular combinations of join types. > > I've got

[Rails] How to use third party library in rails

2010-06-09 Thread wny
Hi, I am trying to use Selenium RC in my rails application. I first install selenium RC ruby client (>gem install selenium-client). Then create a "selenium_test.rb" in libs folder. In the file, I create a class "SeleniumTest". # libs/selenium_test.rb require "selenium-client" class SeleniumTes

[Rails] How to use third party library in rails

2010-06-09 Thread wny
Hi, I am trying to use Selenium RC in my rails application. I first install selenium RC ruby client (>gem install selenium-client). Then create a "selenium_test.rb" in libs folder. In the file, I create a class "SeleniumTest". # libs/selenium_test.rb require "selenium-client" class SeleniumTes

[Rails] comments / blogging gem ?

2010-06-09 Thread Allen Walker
Currently I'm using "acts_as_commentable" which is fine, but I wonder if there is something better and more robust out there as a replacement. On my site I allow people to post news articles etc that are commentable. Thanks in advance -- Posted via http://www.ruby-forum.com/. -- You received th

[Rails] strange problem for nokogiri on Rails 3

2010-06-09 Thread Martin Han
I am test the script named test.rb by command "ruby test.rb" and it pass. Then i converte it as rake task. The rake task pass on rails 2.3.4 but fail on rails 3 beta4 env :rails 3 beta4, ruby 1.8.7, ubuntu test.rb ==

[Rails] Re: Join types

2010-06-09 Thread chris
On Jun 9, 12:38 pm, JohnnyC wrote: > I'm sure this is not a new topic -- I've read mention of it elsewhere > -- but in addition to :joins => :profile, Active Record also > needs :inner_joins => :profile, :outer_joins => :profile, :left_joins > => :profile, and all the popular combinations of join

[Rails] Join types

2010-06-09 Thread JohnnyC
I'm sure this is not a new topic -- I've read mention of it elsewhere -- but in addition to :joins => :profile, Active Record also needs :inner_joins => :profile, :outer_joins => :profile, :left_joins => :profile, and all the popular combinations of join types. I've got a sqlite development enviro

[Rails] Re: To Display save button , when we select an option from drop

2010-06-09 Thread Saurabh Peshkar
Venu Gopal wrote: > Hi > >I need help regarding displaying of a save button when we select some > thing from the drop down. Hi, Try using the following <%= select_tag "name", options_for_select(["Free", "Basic", "Advanced", "Super Platinum"], "Free"), {:onchange => "call a javascript funct

[Rails] Re: check_box_tag problems

2010-06-09 Thread Saurabh Peshkar
Hi, Are you trying to apply a loop on cats hash?? If yes then try this: @var1 = [] params[:cats].each do |key, value| @var1 << key end if @var1.include?(your_key) do this else do that end Regards, Saurabh -- Posted via http://www.ruby-forum.com/. -- You received this message because

Re: [Rails] Re: Chat software

2010-06-09 Thread Narendra sisodiya
You can look at juggernaut @ http://juggernaut.rubyforge.org/. ~Naren On Wed, Jun 9, 2010 at 2:55 PM, Greg Ma wrote: > Hemant Bhargava wrote: > > Hello All, > > > > I want to create an chat software using ruby on rails. It would be just > > like gtalk only. I mean logged in users can see that

[Rails] Re: Update quantity instead of create new

2010-06-09 Thread Robert Walker
Robert Walker wrote: >> it "should update item's quantity" do >> Item.create_or_update_quantity(:product_id => 1, :store_id => 1, >> :quantity => 1) >> Item.create_or_update_quantity(:product_id => 1, :store_id => 1, >> :quantity => 1) >> Item.first.quantity.should eql(2) >> end > >

[Rails] Re: Update quantity instead of create new

2010-06-09 Thread Robert Walker
Marcelo wrote: > I have 3 models: Store, Product and Item > > How do i get this test to pass? > > it "should update item's quantity" do > Item.create(:product_id => 1, :store_id => 1, :quantity => 1) > Item.create(:product_id => 1, :store_id => 1, :quantity => 1) > Item.first.quantity

[Rails] Update quantity instead of create new

2010-06-09 Thread Marcelo
I have 3 models: Store, Product and Item How do i get this test to pass? it "should update item's quantity" do Item.create(:product_id => 1, :store_id => 1, :quantity => 1) Item.create(:product_id => 1, :store_id => 1, :quantity => 1) Item.first.quantity.should eql(2) end I have a be

[Rails] Re: db connection issues in production but not in dev mode

2010-06-09 Thread Yani Yen
Thank you, that was a mistake made by me while writing here my production database is microblogging_production. The postgreSQL database version 8.3.7 Gem list : *** LOCAL GEMS *** actionmailer (2.3.5) actionpack (2.3.5) activerecord (2.3.5) activerecord-jdbc-adapter (0.9.7, 0.9.2) activerecord

[Rails] Re: gsub help

2010-06-09 Thread anon_comp
On Jun 9, 10:45 am, Frederick Cheung wrote: > ruby 1.9 uses a different regular expression. I think that if you want > to include a - in a character class then it should be the last thing > in it. /[\w ! # $ % ^ & * = +-]+\.doc$ works for me Thanks Fred. This is a lot cleaner than the one I have

Re: [Rails] Re: gsub help

2010-06-09 Thread Josh Cheek
On Wed, Jun 9, 2010 at 9:42 AM, anon_comp wrote: > On Jun 9, 9:37 am, anon_comp wrote: > > Here's my code > > > > def index > > file = "BLAH-ex201588.doc" > > @file_cut = order.gsub(/[\w [- ! # $ % ^ & * = +]+]+\.doc$/, > > '*.doc) > > end > > > > The code worked before when I was using

[Rails] Re: gsub help

2010-06-09 Thread Frederick Cheung
On Jun 9, 2:37 pm, anon_comp wrote: > Here's my code > > def index >     file = "BLAH-ex201588.doc" >     @file_cut = order.gsub(/[\w [- ! # $ % ^ & * = +]+]+\.doc$/, > '*.doc) > end > > The code worked before when I was using Ruby 1.9.1, but now I'm using > Ruby 1.8.7 due to technical reasons.

[Rails] Re: db connection issues in production but not in dev mode

2010-06-09 Thread Marnen Laibow-Koser
Yani Yen wrote: > We have an application Ruby on rails, which fires a number of queries to > the database. I Suspect it is connection timeout error or something > > When we run the application in development mode, it works as expected. > However when we switch to Production mode, we get the follow

[Rails] Re: gsub help

2010-06-09 Thread anon_comp
On Jun 9, 9:37 am, anon_comp wrote: > Here's my code > > def index >     file = "BLAH-ex201588.doc" >     @file_cut = order.gsub(/[\w [- ! # $ % ^ & * = +]+]+\.doc$/, > '*.doc) > end > > The code worked before when I was using Ruby 1.9.1, but now I'm using > Ruby 1.8.7 due to technical reasons. I

[Rails] Best strategy to implement secure, one-time voting links

2010-06-09 Thread Alan McCann
I am building an application where guests and registered users are sent an email with a request to vote on a given issue. - registered user sends vote request email, - email containts voting links that have some type of enrypted link paramenter to uniquely identify the vote request to that recipie

Re: [Rails] gsub help

2010-06-09 Thread Amala Singh
I think you should ask this in a Ruby forum. My one cent. On 9 June 2010 14:37, anon_comp wrote: > Here's my code > > def index >file = "BLAH-ex201588.doc" >@file_cut = order.gsub(/[\w [- ! # $ % ^ & * = +]+]+\.doc$/, > '*.doc) > end > > The code worked before when I was using Ruby 1.9.1

Re: [Rails] Re: Moving belongs_to object to different association

2010-06-09 Thread Jeffrey L. Taylor
Quoting Frederick Cheung : > > > On Jun 9, 9:34 am, "Jeffrey L. Taylor" wrote: > > > > Initially, there is one feed in each channel.  old_channel.feeds_count is > > zero > > (Yeah!), but new_channel.feeds_count is still one (Boo!). > > > > does > > feed.channel = new_channel > > work better

[Rails] check_box_tag problems

2010-06-09 Thread Sindri Guðmundsson
Hi, I'm having some trouble with my form. The thing is I'm using a loop to generate check_box_tags and then when the user clicks submit I want to be able to see what he checked. For each checked box I want to copy a file to the corresponding directory. Here's the form: <%form_for :cats, :url => {

[Rails] Ruby on Rails Opportunity in New Orleans

2010-06-09 Thread Sidney Bennett
I am an IT recruiter with TEKsystems and I am working with a local software development company that is looking to hire a developer with an interest in working with Ruby on Rails. The client is willing to hire entry level developers with a small amount of Rails experience or more experienced develo

Re: [Rails] Re: Re: How to create embedding code in ror

2010-06-09 Thread Peter De Berdt
On 09 Jun 2010, at 14:25, Yudi Soesanto wrote: Thanks for yorur help Peter. Do you have link or tutorial guide in the internet? I am new with this. I'll give you the basics, the rest is up to you (setting height, width, injecting in a specific div etc): var iframe = document.crea

[Rails] CSV uploads and CRLF/LF

2010-06-09 Thread Tony
Rails models in the database usually have newlines encoded as \r\n (CRLF) as they are sent via HTTP and that is how the specification indicates they should be sent. When updating fields in my database by posting a CSV file via HTTP from a Linux box the text fields are changed to have \n (LF). I d

[Rails] gsub help

2010-06-09 Thread anon_comp
Here's my code def index file = "BLAH-ex201588.doc" @file_cut = order.gsub(/[\w [- ! # $ % ^ & * = +]+]+\.doc$/, '*.doc) end The code worked before when I was using Ruby 1.9.1, but now I'm using Ruby 1.8.7 due to technical reasons. I would imagine that it should still work, but I doesn't.

[Rails] Re: To display a button onselect of an option from dropdown

2010-06-09 Thread Bohdan Pohoriletz
Venu Gopal wrote: > Hi > > > Is there an option of displaying a button only when you > select an option from dropdown. You can do it with JavaSctipt -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Ra

[Rails] Re: db connection issues in production but not in dev mode

2010-06-09 Thread Yani Yen
Forgot to mention: There are 4 asynchronous queries being fired. Out of these 3 get fired and result is achieved as expected, however the 4th query doesnt produce any result There are no exceptions thrown neither any log created. However in Postgre Sql console the stack trace is as previously

[Rails] Re: rails+sinatra sent image

2010-06-09 Thread Bohdan Pohoriletz
Solved :) #POST create post '/users/create' do f = File.new("temp#{params[:user][:login]}.jpg", "w") t = params[:avatar][:tempfile] while c = t.gets do f.puts(c) end f.close RestClient.post(">{ :login=>params[:user][:login],

[Rails] To display a button onselect of an option from dropdown

2010-06-09 Thread Venu Gopal
Hi Is there an option of displaying a button only when you select an option from dropdown. -- 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 rubyo

[Rails] Fieldset class problem

2010-06-09 Thread Amit
Hello, I am using cucumber(0.8.0), cucumber-rails (0.3.0) and capybara. (0.3.8) There is a scenario where i need to click a button but it does not have a link ,id but it has a image under it. The html code is as follows: How to proceed with this: I had tried with the following code: page.ha

[Rails] db connection issues in production but not in dev mode

2010-06-09 Thread Yani Yen
We have an application Ruby on rails, which fires a number of queries to the database. I Suspect it is connection timeout error or something When we run the application in development mode, it works as expected. However when we switch to Production mode, we get the following error in Postgre conso

[Rails] To Display save button , when we select an option from drop

2010-06-09 Thread Venu Gopal
Hi I need help regarding displaying of a save button when we select some thing from the drop down. -- 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 rubyonr

[Rails] Re: Re: How to create embedding code in ror

2010-06-09 Thread Yudi Soesanto
Thanks for yorur help Peter. Do you have link or tutorial guide in the internet? I am new with this. Yudi Peter De Berdt wrote: > On 09 Jun 2010, at 08:57, Yudi Soesanto wrote: > >> What I am trying to do is: I creating a survey website. User can >> register to create a survey and this survey ca

[Rails] Re: Can a dropdown be used to select additional form fi

2010-06-09 Thread Steve Russo
Collin, Bill, Marnen, Tony, I think I understand why the values within the partials were being blanked out. As Collin mentioned, when stepping through the "create" method, I saw that the passed values were blank, which they definitely should not have been. I realized that I was calling the par

[Rails] Re: Rails crashes when running more than 1 instance..

2010-06-09 Thread Marnen Laibow-Koser
Tim Baas wrote: > Thank you all for the fast responds.. > > I can see now that the problem is I need to run the different > applications on different ports.. > The only thing is, I've heard it has to be possible to run more > applications on one port, I want to use port 80. > I'm using a webserver

[Rails] formula parser in Rails with eval() ?

2010-06-09 Thread Bine Pötzi
Hey guys! I'm relative new to Ruby on Rails, so I'm not sure how to solve following problem: Their are different 'families', which have different values for attributes like 'lc1' or 'ram1' or so on... e.g. ( lc1 = [3,7, 8, 9,15] ...) My formula could look like this "3.0+lc1/log(ram1)". I calculat

[Rails] Re: rails+sinatra sent image

2010-06-09 Thread Frederick Cheung
On Jun 9, 10:14 am, Bohdan Pohoriletz wrote: > I tried next > > post '/users/create' do >   RestClient.post("http://localhost:3000/users";, :user=>params['user'], > :avatar=>File.read("/home/qwerty1/Desktop/client/views/images.jpeg"), > :multipart=>true) >   redirect '/users' > end > > -

[Rails] Re: Chat software

2010-06-09 Thread Greg Ma
Hemant Bhargava wrote: > Hello All, > > I want to create an chat software using ruby on rails. It would be just > like gtalk only. I mean logged in users can see that who else are online > and then they can talk to them. So can you guys tell me that from where > can i start this. Tutorials, Exampl

Re: [Rails] Re: How to create embedding code in ror

2010-06-09 Thread Peter De Berdt
On 09 Jun 2010, at 08:57, Yudi Soesanto wrote: What I am trying to do is: I creating a survey website. User can register to create a survey and this survey can be embedded to other site with providing embedded script. The problem I have, I don't know how to create embedded code via ruby on rail

[Rails] Re: rails+sinatra sent image

2010-06-09 Thread Bohdan Pohoriletz
I tried next post '/users/create' do RestClient.post("http://localhost:3000/users";, :user=>params['user'], :avatar=>File.read("/home/qwerty1/Desktop/client/views/images.jpeg"), :multipart=>true) redirect '/users' end --- require 'paperclip' class User <

[Rails] Re: Rails crashes when running more than 1 instance..

2010-06-09 Thread Tim Baas
Frederick Cheung wrote: > On Jun 9, 8:45�am, MnrKaktus wrote: >> Thank you all for the fast responds.. >> >> I can see now that the problem is I need to run the different >> applications on different ports.. >> The only thing is, I've heard it has to be possible to run more >> applications on one

[Rails] Re: Moving belongs_to object to different association

2010-06-09 Thread Frederick Cheung
On Jun 9, 9:34 am, "Jeffrey L. Taylor" wrote: > > Initially, there is one feed in each channel.  old_channel.feeds_count is zero > (Yeah!), but new_channel.feeds_count is still one (Boo!). > does feed.channel = new_channel work better ? Fred -- You received this message because you are sub

[Rails] Moving belongs_to object to different association

2010-06-09 Thread Jeffrey L. Taylor
I have two AR models in a one-to-many relationship. class Feed < ActiveRecord::Base belongs_to :channel, :counter_cache => true end class Channel has_many :feeds end I need to move a feed to a different channel. This works, except the feeds_counter cache is not changed for the 'to' channe

[Rails] Re: How do I set session_id cookies securely on an http page?

2010-06-09 Thread Frederick Cheung
On Jun 8, 11:35 pm, Skye Weir-Mathews wrote: > If my session_id cookie is set by a request to a https page, and I stay > on https pages, my session_id cookie persists and I can see my session > data. > > If I navigate to an unencrypted page, my session_id gets reset and I > lose access to all m

Re: [Rails] send loggedin user as action paramaters

2010-06-09 Thread Colin Law
On 9 June 2010 09:12, swetha wrote: > > Hi , > > I am having a problem in sending loggedin user and also his website > name as paramters .So that he can have preview of that. > > Relationship : I have 2 models user an website and relationship > between them is > user :has_one website > > > So when

[Rails] Re: string attributes not showing up in view

2010-06-09 Thread Frederick Cheung
On Jun 9, 1:16 am, Ali Akhtarzada wrote: > Oh ok. Did not know that. Thanks! > > After I got rid of the '@' part they were still returning nil. I had an > attr_accessor :first_name, :last_name defined. Things worked after getting > rid of that. I guess having attr_Accessor with the same names ov

[Rails] Re: rails+sinatra sent image

2010-06-09 Thread Frederick Cheung
On Jun 9, 6:52 am, Bohdan Pohoriletz wrote: >   post '/users/create' do >     RestClient.post("http://localhost:3000/users";, > :user=>params['user']) >     redirect '/users' >   end > > I would like to sent file to server in this action. > > So the question is: How to sent file as a param to s

[Rails] Re: Select question?

2010-06-09 Thread Frederick Cheung
On Jun 8, 6:18 pm, Lamer Lamer wrote: > view > <%= select( :order, :hcins, { "Man" => 3, "Is" => 5}) %> > (hcins is string value) > [...] > when I submit the form "hcins" gets "3 or 5" but I like to get text of > selection("man" or "is") for "hcins" and values for "ucret" calculation. > If you

[Rails] How to use Selenium RC in Rails

2010-06-09 Thread wny
Hi, I am trying to use Selenium RC in my rails application. I first install selenium RC ruby client (>gem install selenium-client). Then create a "selenium_test.rb" in libs folder. In the file, I create a class "SeleniumTest". # libs/selenium_test.rb require "selenium-client" class SeleniumTes

[Rails] Re: Rails crashes when running more than 1 instance..

2010-06-09 Thread Frederick Cheung
On Jun 9, 8:45 am, MnrKaktus wrote: > Thank you all for the fast responds.. > > I can see now that the problem is I need to run the different > applications on different ports.. > The only thing is, I've heard it has to be possible to run more > applications on one port, I want to use port 80. >

[Rails] send loggedin user as action paramaters

2010-06-09 Thread swetha
Hi , I am having a problem in sending loggedin user and also his website name as paramters .So that he can have preview of that. Relationship : I have 2 models user an website and relationship between them is user :has_one website So when i click on <%= link_to 'preview' ,:controller=>'home',

[Rails] Chat software

2010-06-09 Thread Hemant Bhargava
Hello All, I want to create an chat software using ruby on rails. It would be just like gtalk only. I mean logged in users can see that who else are online and then they can talk to them. So can you guys tell me that from where can i start this. Tutorials, Examples, Plugins etc .. -- Posted via h

[Rails] Re: Rails crashes when running more than 1 instance..

2010-06-09 Thread MnrKaktus
Thank you all for the fast responds.. I can see now that the problem is I need to run the different applications on different ports.. The only thing is, I've heard it has to be possible to run more applications on one port, I want to use port 80. I'm using a webserver.. What are your ideas about t

[Rails] papaerclip file name and special characters

2010-06-09 Thread Tom Mac
Hi I have a problem checking the uniquness of filename. My rails controller code is if params[:document]["attachment"] && (current_user.documents.find(:all).map(&:attachment_file_name).include? params[:document]["attachment"].original_filename) flash[:error] = "File already exists"

[Rails] Re: Can a dropdown be used to select additional form fi

2010-06-09 Thread tonypm
Steve, When you reload/refresh the page, the browser remembers some of the current state of the page, so that a browser refresh is not the same as loading the page again - ie by resubmitting the url (which best simulates the effect you see after a validation error). It is easy to get fooled with