[Rails] Re: seed data in fixtures ?

2011-12-26 Thread Robert Walker
Chris Downey wrote in post #1038285: > Does anybody know of a way to populate fixtures with seed data? I've > put a > great deal of time and thought into the seeds.rb code - it sure would be > handy to run tests on that data. I'm hoping to not have to somehow > duplicate seed data in the YML file

[Rails] regex issues and up gradation Ruby ,Rails and gem

2011-12-26 Thread sachin kewale
hi all, i am getting the following warning for "numeric_slug = /^[0-9]+$/" this line in my model class, "warning: character class has `-' without escape" can anyone know the what is the escape character used in regex ? i am using Ruby:1.8.7,gem:1.6.2,Rails:2.3.11. Also, i want to up gra

Re[3]: [Rails] Adding a path to assets for Rails 3.1.2

2011-12-26 Thread Ralph Shnelvar
Monday, December 26, 2011, 4:54:22 PM, you wrote: RS> Monday, December 26, 2011, 3:45:08 PM, you wrote: RS>> Monday, December 26, 2011, 1:17:14 PM, you wrote: RS>>> Referring to http://guides.rubyonrails.org/asset_pipeline.html it says: RS>>> - - - - RS>>> You can add additional (fully qualifie

[Rails] Re: problem working on old rails app

2011-12-26 Thread ari g.
Holy camoley it's working. Well, my app isn't showing but rails is booting, the servers up and I get a nice page when I go to http://0.0.0.0:3000 I got the answer after searching for "no such file mongrel_rails". This page (http://efreedom.com/Question/1-6401240/Rails-Mongrel-RVM-Fails-Startu

Re: [Rails] rails sharepoint

2011-12-26 Thread Walter Lee Davis
Can you explain what you need here? Do you mean 'access SharePoint (the Microsoft product)' or do you mean 'list a bunch of files from a file server' within the context of a Rails application? Walter On Dec 26, 2011, at 10:40 PM, CC Chen wrote: > Does somebody success link sharepoint by Rails

[Rails] Re: problem working on old rails app

2011-12-26 Thread ari g.
I've gotta go help give a 2 year old a bath so I figured I'd post my latest update. Here's the full stack trace (pretty short): ./script/../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in `load': no such file to load -- mongrel_rails (MissingSourceFile) from .

[Rails] rails sharepoint

2011-12-26 Thread CC Chen
Does somebody success link sharepoint by Rails ? Please tell me how to do it. Does it can work by using ruby/rails? 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 g

[Rails] Re: problem working on old rails app

2011-12-26 Thread ari g.
So now I'm at rails 1.2.3 (when I do a 'rails --version' that's what I get). Only trick is that now I'm getting: vendor/rails/activesupport/lib/active_support/dependencies.rb:488:in `load': no such file to load -- mongrel_rails (MissingSourceFile) I'm going to start looking into it but I thoug

[Rails] seed data in fixtures ?

2011-12-26 Thread Chris Downey
Does anybody know of a way to populate fixtures with seed data? I've put a great deal of time and thought into the seeds.rb code - it sure would be handy to run tests on that data. I'm hoping to not have to somehow duplicate seed data in the YML files. thanks! -- You received this message beca

[Rails] Re: problem working on old rails app

2011-12-26 Thread ari g.
goodness gracious I think the app is written in rails 1.2.3 because I see this in my environment.rb file: RAILS_GEM_VERSION = '1.2.3' I thought I was up to 2.0 but I may not have committed those changes to rubyforge's svn. Hmm... I'm going to try your trick with passing gem install a version

Re: [Rails] Re: problem working on old rails app

2011-12-26 Thread Walter Lee Davis
gem install can be passed a version argument, so just install the version your application.rb has listed. Trying to bring up a Rails 2.3.x app under 3.1.3 is way too many moving parts for anyone. Yes, you should update, but just get it running and passing its tests under the original version bef

Re: [Rails] weird capistrano error: caching old hostnames?

2011-12-26 Thread Craig White
On Mon, 2011-12-26 at 17:20 -0800, Mike C wrote: > I'm trying to move my app to a new server, and in the deploy.rb file I > updated the hostname to reflect the new server. However, when I run > any cap task it still contacts the old server no matter what, and I > can't figure out why this is. There

Re: [Rails] Is it possible to manage four models in a form?

2011-12-26 Thread Bruno Meira
Sorry, I made a mistake... Your name is Mauro and not Marco. ;/ -- 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-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonr

Re: [Rails] Is it possible to manage four models in a form?

2011-12-26 Thread Bruno Meira
Hi Marco, If I understand your question, Do you want to fill in one form many models. Am I right? If your question is this you can use fields_for to apply it. Check something similar in http://railscasts.com/episodes/73-complex-forms-part-1 :D -- You received this message because you are subscri

[Rails] weird capistrano error: caching old hostnames?

2011-12-26 Thread Mike C
I'm trying to move my app to a new server, and in the deploy.rb file I updated the hostname to reflect the new server. However, when I run any cap task it still contacts the old server no matter what, and I can't figure out why this is. There is no reference to the old server anywhere I can see. -

[Rails] Re: problem working on old rails app

2011-12-26 Thread ari g.
Thanks for the help, Walter. The more I work on this, the more I see that my problem is one of trying to get old code up and running. I'm going to try that Bundler trick, just to see what it does but that page describes how to get it running in Rails 2.3 and a 'sudo gen install rails' brought

[Rails] jw_player_helper & Rails 3.1.1

2011-12-26 Thread Ralph Shnelvar
I am trying to get this http://rubydoc.info/gems/jw_player_helper/0.0.1/file/README.markdown# gem to work on 3.1.1 and am having a really difficult time. (I got a similar gem to work in 2.3.8). Does anyone know how to send a message to the author for help? Has anyone been successful in gettin

Re[2]: [Rails] Adding a path to assets for Rails 3.1.2

2011-12-26 Thread Ralph Shnelvar
Monday, December 26, 2011, 3:45:08 PM, you wrote: RS> Monday, December 26, 2011, 1:17:14 PM, you wrote: RS>> Referring to http://guides.rubyonrails.org/asset_pipeline.html it says: RS>> - - - - RS>> You can add additional (fully qualified) paths to the pipeline in RS>> config/application.rb. For

[Rails] Re: Add params to link :method=>POST

2011-12-26 Thread Bruno Meira
I'm using link_to helper -- 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-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com.

[Rails] Add params to link :method=>POST

2011-12-26 Thread Bruno Meira
Hi Guys, I hava a link that send via ajax some data. In this link I want to insert some params... How can I do this? thx :D Bruno Meira -- 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-talk

Re[2]: [Rails] Adding a path to assets for Rails 3.1.2

2011-12-26 Thread Ralph Shnelvar
Monday, December 26, 2011, 3:45:08 PM, you wrote: RS> Monday, December 26, 2011, 1:17:14 PM, you wrote: RS>> Referring to http://guides.rubyonrails.org/asset_pipeline.html it says: RS>> - - - - RS>> You can add additional (fully qualified) paths to the pipeline in RS>> config/application.rb. For

Re: [Rails] Adding a path to assets for Rails 3.1.2

2011-12-26 Thread Ralph Shnelvar
Monday, December 26, 2011, 1:17:14 PM, you wrote: RS> Referring to http://guides.rubyonrails.org/asset_pipeline.html it says: RS> - - - - RS> You can add additional (fully qualified) paths to the pipeline in RS> config/application.rb. For example: RS> config.assets.paths << Rails.root.join("app",

Re: [Rails] problem working on old rails app

2011-12-26 Thread Walter Lee Davis
On Dec 26, 2011, at 5:16 PM, ari g. wrote: > Hi there, > > I hope my subject is ok. Basically, I was working on an app a few years > ago (say, spring of 2008) and want to start working on it again. > > I checked out the lastest version of the code from rubyforge, got mysql, > updated rails and

[Rails] problem working on old rails app

2011-12-26 Thread ari g.
Hi there, I hope my subject is ok. Basically, I was working on an app a few years ago (say, spring of 2008) and want to start working on it again. I checked out the lastest version of the code from rubyforge, got mysql, updated rails and ruby (or so I think) and when I went to run script/server

Re: [Rails] Is it possible to manage four models in a form?

2011-12-26 Thread Mauro
On 26 December 2011 19:36, Bruno Meira wrote: > Hey, > Take a look at fields_for helper. This helper might help you. > :D Sorry for my ignorance, I'm trying but I don't see the way fields_for can help. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails:

[Rails] Dependent select in nested attributes

2011-12-26 Thread Angelo Cordova
Hello people. I have a problem with this. I've followed this tutorial http://www.petermac.com/rails-3-jquery-and-multi-select-dependencies/ and I can have a dependent select. But it works just if the fields belongs to the same form. But in my app I have a model call "invoices", in the "main form"

[Rails] Adding a path to assets for Rails 3.1.2

2011-12-26 Thread Ralph Shnelvar
Referring to http://guides.rubyonrails.org/asset_pipeline.html it says: - - - - You can add additional (fully qualified) paths to the pipeline in config/application.rb. For example: config.assets.paths << Rails.root.join("app", "assets", "flash") - - - - I did that but when I look at Rails.appl

Re: [Rails] Is it possible to manage four models in a form?

2011-12-26 Thread Bruno Meira
Hey, Take a look at fields_for helper. This helper might help you. :D -- 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-talk@googlegroups.com. To unsubscribe from this group, send email to r

Re: Re[2]: [Rails] Where to put videos? Heroku?

2011-12-26 Thread Hassan Schroeder
On Mon, Dec 26, 2011 at 9:26 AM, Ralph Shnelvar wrote: > Yeah ... but how do I get the video player to point to it? Dunno; presumably the video player also supports passing a URL as the video source. If not, that would be bad. But unlikely, I'd think :-) > And, what, for instance, would I be po

Re[2]: [Rails] Where to put videos? Heroku?

2011-12-26 Thread Ralph Shnelvar
Hassan, Monday, December 26, 2011, 10:11:39 AM, you wrote: HS> On Mon, Dec 26, 2011 at 7:43 AM, Ralph Shnelvar wrote: >> Part of what I am trying to do is get the app ready to be hosted by >> Heroku.  I have about a gigabyte of videos and I remember reading that >> that much stuff should be "p

[Rails] Re: How to output a list of category names ?

2011-12-26 Thread Nikolay
Thanks for help. It works fine! On 26 дек, 20:49, Hassan Schroeder wrote: > On Sun, Dec 25, 2011 at 7:48 PM, Nikolay wrote: > >                                             ~VIEW~ > > ../_contract.html.erb > > <%= @places.names %> # Does't work > >    @places.map(&:name) > > will give you an arra

Re: [Rails] Where to put videos? Heroku?

2011-12-26 Thread Hassan Schroeder
On Mon, Dec 26, 2011 at 7:43 AM, Ralph Shnelvar wrote: > Part of what I am trying to do is get the app ready to be hosted by > Heroku.  I have about a gigabyte of videos and I remember reading that > that much stuff should be "provisioned", whatever that means. Yeah, I don't think you can even d

Re: [Rails] Scrap Video URL

2011-12-26 Thread Walter Lee Davis
On Dec 26, 2011, at 7:54 AM, MUMU wrote: > Hi All, > > I want to know how to scrap video url's based on some conditions > like comments, share etc... > I used Net::HTTP succesfully scraped but not on the conditions. Please > help me out... > You're going to need to do this in two passes. Firs

Re: [Rails] How to output a list of category names ?

2011-12-26 Thread Hassan Schroeder
On Sun, Dec 25, 2011 at 7:48 PM, Nikolay wrote: >                                             ~VIEW~ > ../_contract.html.erb > <%= @places.names %> # Does't work @places.map(&:name) will give you an array of names which you can format as you wish. HTH, -- Hassan Schroeder -

[Rails] Re: Documentation to Installation Ruby on rails on Ubuntu 11.04

2011-12-26 Thread Vell
Is this for a development environment? or a production environment? If it development then you can use the following steps to install: 1. install RVM (single user) -- http://beginrescueend.com/rvm/install/ -- Follow the directions carefully. 2. Use RVM to install the ruby environment that you wan

Re: [Rails] Is it possible to manage four models in a form?

2011-12-26 Thread Mauro
On 26 December 2011 03:14, Jim Ruther Nill wrote: > > > On Mon, Dec 26, 2011 at 7:50 AM, Samir Selman > wrote: >> >> Try looking into nested forms >> >> >> On Sun, Dec 25, 2011 at 12:49 PM, Mauro wrote: >>> >>> The models are: >>> >>> Company >>>  has_many :categorizations >>>  has_many :categor

[Rails] Where to put videos? Heroku?

2011-12-26 Thread Ralph Shnelvar
I am attempting to port a Rails 2.3.8 application to 3.1.2 In my 2.3.8 app I am able to play videos ... no problem. In 3.1.2, I am not. I have read http://rubydoc.info/gems/jw_player_helper/0.0.1/file/README.markdown and the documentation there says, ":file => "relative path to file (for example

Re: [Rails] How to check whether the character is utf-8

2011-12-26 Thread Pradeep
Hi Loganathan, I guess this might help you with your issue. Try using this helper: http://snippets.dzone.com/posts/show/4527 It puts a method utf8? on the String. So you can grab the String from mysql and see if it is utf8: my_string.utf8? If is not, then you can try change the encoding of yo

Re: [Rails] Re: Invalid gemspec.#

2011-12-26 Thread Qzi
I had test the command follow last night ! gem install activemodel --pre issue is still ... But I had reinstall all and work fine now ! On Mon, Dec 26, 2011 at 10:47 PM, Luis Lavena wrote: > On Dec 25, 12:57 pm, Qzi er wrote: > > > > next follow your replay ! > > > > [root@-PC rubytest]# rai

[Rails] Re: Invalid gemspec.#

2011-12-26 Thread Luis Lavena
On Dec 25, 12:57 pm, Qzi er wrote: > > next follow your replay ! > > [root@-PC rubytest]# rails test5 > Invalid gemspec in > [/usr/lib/ruby/gems/1.8/specifications/activemodel-3.2.0.rc1. > gemspec]: Illformed requirement ["# > 3.2.0.rc1 > "] Seems gemspec didn't regenerate Please use gem install

Re: [Rails] How to check whether the character is utf-8

2011-12-26 Thread loganathan sellappa
Hi Pradeep, Thanks for your response, I just need to check the string, string="ABCDabcd123" string.encoding.name it shows IBM4378, but I want to know whether the string is under UTF-8 encoding format or not regards, Loganathan On Mon, Dec 26, 2011 at 5:53 PM, Pradeep wrote: > Hi Loganatha,

[Rails] How to output a list of category names ?

2011-12-26 Thread Nikolay
~MODEL~ ../contract.rb class Contract < ActiveRecord::Base has_and_belongs_to_many :places end ../place.rb class Place < ActiveRecord::Base has_and_belongs_to_many :contracts end ../schema.rb create_table "contracts", :force => true do |t|

Re: [Rails] How to check whether the character is utf-8

2011-12-26 Thread Pradeep
Hi Loganatha, Please check this link, let me know if this what you are looking for http://blog.twodividedbyzero.net/2009/11/adding-accept-charset-attribute-to-html.html Thanks Pradeepan On Mon, Dec 26, 2011 at 12:13 PM, loganathan sellappa < loganathan...@gmail.com> wrote: > Hi All, > > I wan

[Rails] Re: method_missing not working in RoR 3.1.1 & Ruby 1.9.2p290?

2011-12-26 Thread Ralph Shnelvar
Oh, yeah, this is a Rails issue and not a Ruby one. -- 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-talk@googlegroups.com. To unsubscribe from th

Re: [Rails] Re: Finding Username of the machine from which rails app accessed

2011-12-26 Thread Peter De Berdt
On 26 Dec 2011, at 13:55, venkata reddy wrote: The exact requirement is, the rails app will be hosted in the lan itself. And when the user/employee opens the home page of the application, an action should be triggered and it should fetch the logged in user name(here logged name means the user w

[Rails] Re: Finding Username of the machine from which rails app accessed

2011-12-26 Thread venkata reddy
The exact requirement is, the rails app will be hosted in the lan itself. And when the user/employee opens the home page of the application, an action should be triggered and it should fetch the logged in user name(here logged name means the user who is using the machine), and the same thing(saying

[Rails] Scrap Video URL

2011-12-26 Thread MUMU
Hi All, I want to know how to scrap video url's based on some conditions like comments, share etc... I used Net::HTTP succesfully scraped but not on the conditions. Please help me out... Thanking You Santosh Mohanty -- You received this message because you are subscribed to the Google Groups

[Rails] How to check whether the character is utf-8

2011-12-26 Thread loganathan sellappa
Hi All, I want to check whether the input string is in UTF-8 encoding formate, I googled but didnt get any fruitful results, pls assit me , thanks in advance. regards, Loganathan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post t

Re: [Rails] Finding Username of the machine from which rails app accessed

2011-12-26 Thread Gautam Pai
request.env['REMOTE_HOST'] should be the closest to what you want. Gautam Pai On Mon, Dec 26, 2011 at 3:38 PM, sandip ransing wrote: > observe request parameters but i dont think its giving machine name > > > On Mon, Dec 26, 2011 at 3:29 PM, venkata reddy > wrote: > >> Hi All, >>Can any

Re: [Rails] Finding Username of the machine from which rails app accessed

2011-12-26 Thread Pravin Mishra
i m not sound on rails, but if U take a look to this site it not able to access machine name. http://iplocationtools.com/ http://www.ipaddresslocation.org/ i think U using either this gem http://geokit.rubyforge.org/index.html or any other derived gem . form my knowledge there is not option to ge

[Rails] Re: method_missing not working in RoR 3.1.1 & Ruby 1.9.2p290?

2011-12-26 Thread Ralph Shnelvar
Ok, I solved this one. Short answer: replace def method_missing(undefined_name, *args) with def action_missing(undefined_name, *args) in your controller Longer answer: I can't find this documented anywhere but in the Rails source code. See vendor\bundle\ruby\1.9.1\gems\actionpack-3.1.

Re: [Rails] Finding Username of the machine from which rails app accessed

2011-12-26 Thread sandip ransing
observe request parameters but i dont think its giving machine name On Mon, Dec 26, 2011 at 3:29 PM, venkata reddy wrote: > Hi All, >Can anybody tell me, is there any way that i can find the name > of the computer/machine rather than ip of the machine, from where a > user is accessing my

[Rails] Finding Username of the machine from which rails app accessed

2011-12-26 Thread venkata reddy
Hi All, Can anybody tell me, is there any way that i can find the name of the computer/machine rather than ip of the machine, from where a user is accessing my rails application? I was asked to do some research on this...please help. -- You received this message because you are subscrib

Re: [Rails] Documentation to Installation Ruby on rails on Ubuntu 11.04

2011-12-26 Thread Gautam Pai
check this link. It has worked for me on ubuntu 10.04, 10.10, 11.04 and 11.10 You might want to install ruby version 1.9.3 though. http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/ Gautam Pai On Mon, Dec 26, 2011 at 11:53 AM, honey ruby wrote: > hey can any one help me out in install