Re: [Rails] Re: local variable

2010-03-11 Thread Sandip Ransing
request parameters are always strings. You can convert string parameter to integer in controller using *to_i*method. On Wed, Mar 10, 2010 at 1:16 AM, Robert Walker wrote: > kevid wrote: > > pls can you post the link? > > > http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#M00

Re: [Rails] Re: integrate google ads in rails application

2010-03-11 Thread mahesh s
Thank buddy its helped me a lot On Thu, Mar 11, 2010 at 9:17 PM, John Goewert wrote: > Besides you plugging your adsense link straight in to your view, there > is a plugin for it. > > http://github.com/JasonKing/google_ad_sense > > > On Mar 11, 12:52 am, mahesh s wrote: > > Hi friends > > > >

[Rails] Re: Re: `bin_path' for Gem:Module (NoMethodError)

2010-03-11 Thread Faisal Basha
Hassan Schroeder wrote: > On Wed, Mar 10, 2010 at 11:38 AM, Faisal Basha > wrote: > > Mostly that looks good; the only thing that strikes me right off is > the discrepancy between your reported gem version and that of > the rubygems-update. > >> unknown0011248da679:~ faisal$ gem env >> �- RUBYG

[Rails] method of rolling up text

2010-03-11 Thread sipho
i have stuck in rolling up text method in ruby -- View this message in context: http://old.nabble.com/method-of-rolling-up-text-tp27873768p27873768.html Sent from the RubyOnRails Users mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Gro

Re: [Rails] Is there a rails way to validate format of an email address?

2010-03-11 Thread kannav rajeev
validates_format_of :email, :with => /\A([...@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i, :on => :create end On Wed, Mar 10, 2010 at 5:16 PM, Rajinder Yadav wrote: > How can I validate and email address without using complex reg-ex is there > a simple rails way to do this? > > > -- > Kind Regar

[Rails] Re: Need example of a drop-down field in Rails 2.3.5

2010-03-11 Thread RichardOnRails
Hi there, Premature posting. It just dawned on me to Google for "Rails acts as dropdown". That seems very fruitful, so I don't think I need any help. Nevertheless, I'll accept any that's offered :-) Best wishes, Richard On Mar 11, 11:39 pm, RichardOnRails wrote: > Hi All, > > I've looked a

[Rails] Need example of a drop-down field in Rails 2.3.5

2010-03-11 Thread RichardOnRails
Hi All, I've looked at a few of my Rails 2 books & Google to no avail in the effort to find an example of using a drop-down control. Any suggestions (especially a URL or two)? Thanks in Advance, Richard -- You received this message because you are subscribed to the Google Groups "Ruby on Rail

Re: [Rails] render a Google Chart to a file

2010-03-11 Thread Rob Biedenharn
On Mar 11, 2010, at 6:04 PM, Adam Ziemba wrote: Anyone not familiar with Google Charts, it's simple, a PNG image is produced by a configured URL. E.g. follow the link: http://chart.apis.google.com/chart?cht=bvg&chbh=a&chd=s:vttusty&chs=500x300&chxt=x,y&chxl=0 :|Sun|Mon|Tue|Wed|Thu|Fri|Sat|1:|0

[Rails] Re: ActionMailer - attaching a PDF

2010-03-11 Thread Adam Ziemba
I think I got it, thanks for your help!!! -- 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, s

[Rails] Re: Decimal fields generated in Rails 2.3.5 act like strings

2010-03-11 Thread RichardOnRails
Hi Robert, Thanks for your help. I mistakenly reported MySQL's version as 2.0.37. It's actually 5.0.37. But that's a little behind the times, so I upgraded to 5.1.44 which seems to work fine in general. But I ran into a snag getting my RoR working with 5.1.44. I think the problem is I only du

[Rails] Migration Help

2010-03-11 Thread Sumeet Panchal
Hi, I need to create a migration that will populate data in my table. Table is like Column table (id, column_name, fa_module_id) column_name stores column name of the tables existing in our database for example I have a table Customer(id, first_name, last_name, age) then each row of Columns ta

[Rails] Re: ActionMailer - attaching a PDF

2010-03-11 Thread Adam Ziemba
This definitely helps, thank you, but I still am unsure how to pass the parameters to the mymodel.pdf_render action? The only way I know of to pass parameters is as if it were a URL, such as with: /mymodel/pdf_render?data=BLAH or something like: :controller => 'mymodel', :action => 'pdf

[Rails] render a Google Chart to a file

2010-03-11 Thread Adam Ziemba
Anyone not familiar with Google Charts, it's simple, a PNG image is produced by a configured URL. E.g. follow the link: http://chart.apis.google.com/chart?cht=bvg&chbh=a&chd=s:vttusty&chs=500x300&chxt=x,y&chxl=0:|Sun|Mon|Tue|Wed|Thu|Fri|Sat|1:|0|2|4|6|8|10|12 You'll see a chart that is a PNG imag

[Rails] Re: rendering simple html from view/controller

2010-03-11 Thread adedip
Ok..so that's what I mean: I need to create a new view where I want to insert for istance (and in this exact case) a form that I use to upload a file and then process the file. So in first place I create a view "new2.html.erb" in my view folder associated to a controller let's say "references" wit

[Rails] Trying to create search filter persistence using SearchLogic

2010-03-11 Thread dburges
I have just set up a search form on my index using SearchLogic- it works great. However, since there are several search parameters in the form I want the results of the most recent search to remain in effect until the user does a new search. I can't figure out how to do this! I've tried a few thing

[Rails] Strange error, possibly coming from ActiveRecord

2010-03-11 Thread artemave
I didn't get much help from stackoverflow people, hence trying heavy artillery here. http://stackoverflow.com/questions/2424446/strange-error-coming-from-activerecord-probably P.S. In case posting links from other forums (as opposed to reposting the question) is considered a bad style, I'm more t

Re: [Rails] Find Last Errors

2010-03-11 Thread Rob Biedenharn
On Mar 11, 2010, at 4:15 PM, Colin Law wrote: Hmm, does the id happen to be 4? ;-) try: irb> puts nil.id I suspect you may well have hit the nail on the head, but why would accessing nil.id in the code not generate the 'Called id for nil' error? It does for me. Colin development mode ve

[Rails] Re: Email section

2010-03-11 Thread Punit Rathore
Manish, >/root/ksmm/app/controllers/email_controller.rb:12:in `remind' It says there is an error on line 12. I'm guessing this is the line UserMailer.deliver_reminder(user) You might want to paste the code for that method too. Punit -- Posted via http://www.ruby-forum.com/. -- You

[Rails] Re: rendering simple html from view/controller

2010-03-11 Thread Punit Rathore
Andrea, You need to provide us with more information. From the info you have given I cannot figure out what is going on. > "Couldn't find Product with ID=new2" You say that you have an empty method, but it is trying to find a Product with ID=new2. I think that it cannot find the correct route

[Rails] Re: Call a controller method from a view

2010-03-11 Thread Punit Rathore
Greg, Since its a post request, you should have a form in your view, which when submitted, will ensure that all the text fields etc. are available in your controller. Punit Greg Ma wrote: > Hi, > Thanks it works better now. But how am i supposed to access my textfield > if I am using a get m

[Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
ok, it seems to have worked. Thanks alot for your help .. I tried to be carefull, but I realize that the way ruby functions return default values that debug code in the wrong place can mess up the return result. I often write code to return an explicit result. After not making any sense of why it

Re: [Rails] Find Last Errors

2010-03-11 Thread Colin Law
On 11 March 2010 20:42, Rob Biedenharn wrote: > On Mar 11, 2010, at 2:21 PM, Colin Law wrote: >> >> On 11 March 2010 18:56, Chris Kalaboukis wrote: >>> >>> Hi guys: This is driving me crazy. Can someone please point me in the >>> right direction: >>> >>> I'm trying to get the last record from my

[Rails] Re: table aliases in a JOIN (was "discriminating two FK refs..")

2010-03-11 Thread Fearless Fool
By the way, the following works, but I was hoping that ActiveRecord could assemble a query without so much exposed SQL. Does anyone have anything better? s = SalesFact.all( :select => 'sold.short_month_name AS sold_month, ' + 'COUNT(*) as units_sold', :joins => 'INNER JOIN date

[Rails] Re: load seeds.rb in test and no truncating data

2010-03-11 Thread Robert Walker
Heinz Strunk wrote: > I know what you mean but it really sucks to wait up to 2 mins. to run > every single test... what else can I do to speed it up? Don't run every single test every time. Use something like autotest to run just the tests specific to the files you're changing as you code. This

[Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
so I just did: yum install gcc-c++ autoconf make and deleted the ext directory and tried 'gem install pg' and go the same error. in the mkmf.log I saw this: -- "gcc -E -I. -I/usr/lib/ruby/1.8/i386-linux -I. -D_FILE_OFFSET_BITS=64 -I/usr/include -O2 -g -pipe -Wall -

Re: [Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Craig White
On Thu, 2010-03-11 at 12:28 -0800, Jedrin wrote: > I deleted the directory as you mentioned and reran it. I have some of > my debug print code in the make file utility here in that log file as > well: > > /usr/bin/ruby extconf.rb > checking for pg_config... my in check_for > my postpone:mkmftmp1.l

Re: [Rails] Find Last Errors

2010-03-11 Thread Rob Biedenharn
On Mar 11, 2010, at 2:21 PM, Colin Law wrote: On 11 March 2010 18:56, Chris Kalaboukis wrote: Hi guys: This is driving me crazy. Can someone please point me in the right direction: I'm trying to get the last record from my table. Every time I do this, it tells me there is no method, other t

[Rails] FreeImage exception error

2010-03-11 Thread Cs Webgrl
Hi, I just started getting this error on my production machine with a jpg. FreeImage exception for type ???: IPTC: Invalid key 'Tag 0x025C' Here's a portion of the error output /var/www/website/releases/20100311200741/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/processors/image

[Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
I deleted the directory as you mentioned and reran it. I have some of my debug print code in the make file utility here in that log file as well: /usr/bin/ruby extconf.rb checking for pg_config... my in check_for my postpone:mkmftmp1.log my open:mkmf.log step 2 step 3 # # yes my check for header c

[Rails] Re: load seeds.rb in test and no truncating data

2010-03-11 Thread Heinz Strunk
I know what you mean but it really sucks to wait up to 2 mins. to run every single test... what else can I do to speed it up? -- 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 grou

[Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
I had put debug prints in the code and the reopen of stdout messed that up. In reality it tries the gcc command below. I did not have gcc installed, I then installed that. When I try the gcc command line from the log I get the error below, except I don't know what directory ruby issues that from:

Re: [Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Craig White
On Thu, 2010-03-11 at 10:44 -0800, Jedrin wrote: > > > > getcwd failure seems to indicate that your current path is a directory > > that no longer exists (like it was deleted) > > > > cd / > > > > then try again > > > > That was strange as 'ls' showed I was in a directory, but that fixed > t

[Rails] Re: discriminating two FK references into one table?

2010-03-11 Thread Fearless Fool
Andrius Chamentauskas wrote: > Just do SalesFact.first(:include => > [:on_market_date_dimension, :sale_date_dimension]). Then you can > access dates with sales_fact.on_market_date_dimension and > sales_fact.sale_date_dimension. Ah - yes, that would work! But am I wrong in thinking that pushes all

[Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
My code is dying someplace in a log file operation in mkmf.rb while trying to find and process the header file: module Logging @log = nil @logfile = 'mkmf.log' @orgerr = $stderr.dup @orgout = $stdout.dup @postpone = 0 def self::open @log ||= File::open(@logfile, 'w') @log.syn

[Rails] Re: load seeds.rb in test and no truncating data

2010-03-11 Thread Robert Walker
Heinz Strunk wrote: > Well, I meant the data from seeds.rb which is not loaded in the test > environment by default. I just db:seed RAILS_ENV=test and commented > fixtures :all out so the seed doesn't get overridden. As I said, This is a VERY BAD idea. One of the primary rules of testing is to

[Rails] Re: How to hide an object???

2010-03-11 Thread Robert Walker
Guille San wrote: > Hi Robert: > First of all I want to thank you for all the time you are spending > helping me. > >> I also just noticed that once you get the hide() working, you have >> nothing in your script to show it again. You are trying to make an AJAX >> call to update it's contents ev

[Rails] Re: load seeds.rb in test and no truncating data

2010-03-11 Thread Heinz Strunk
Well, I meant the data from seeds.rb which is not loaded in the test environment by default. I just db:seed RAILS_ENV=test and commented fixtures :all out so the seed doesn't get overridden. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to th

[Rails] Re: discriminating two FK references into one table?

2010-03-11 Thread Andrius Chamentauskas
Just do SalesFact.first(:include => [:on_market_date_dimension, :sale_date_dimension]). Then you can access dates with sales_fact.on_market_date_dimension and sales_fact.sale_date_dimension. On Mar 11, 6:54 am, Fearless Fool wrote: > Andrius Chamentauskas wrote: > > Well first of all are you 100%

[Rails] table aliases in a JOIN (was "discriminating two FK refs..")

2010-03-11 Thread Fearless Fool
Note: I've got SQL doing what I need. Now I just need ActiveRecord to produce the corresponding query. Consequently, this is a re-framing of the post http://www.ruby-forum.com/topic/205747 'discriminating two FK references into one table?' Here's an SQL query I'd like ActiveRecord to produce

[Rails] Re: load seeds.rb in test and no truncating data

2010-03-11 Thread Robert Walker
Heinz Strunk wrote: > Is there any command to copy the development database to the test > database? Not the schema, the database itself. This is a really BAD idea. Don't do it! Instead use Machinist or something like it: http://github.com/notahat/machinist -- Posted via http://www.ruby-forum.co

Re: [Rails] Re: how database driven content localization is done?

2010-03-11 Thread Colin Law
On 11 March 2010 19:21, karikrishni wrote: > I am sorry, I am very new to rails. > > Let say I have blog post model with the following properties > > 1. Title > 2. Description > 3. created_at > 4. updated_at > 5. slug > > In the above model, I need to localize title and description. If that > is t

[Rails] Re: how database driven content localization is done?

2010-03-11 Thread karikrishni
I am sorry, I am very new to rails. Let say I have blog post model with the following properties 1. Title 2. Description 3. created_at 4. updated_at 5. slug In the above model, I need to localize title and description. If that is the case, how it would be done? We have english, south indian an

Re: [Rails] Find Last Errors

2010-03-11 Thread Colin Law
On 11 March 2010 18:56, Chris Kalaboukis wrote: > Hi guys: This is driving me crazy. Can someone please point me in the > right direction: > > I'm trying to get the last record from my table. Every time I do this, > it tells me there is no method, other than id. > > theconditions = "criteria = '"+

[Rails] Re: Find Last Errors

2010-03-11 Thread Chris Kalaboukis
Aldric Giacomoni wrote: > Chris Kalaboukis wrote: >> Hi guys: This is driving me crazy. Can someone please point me in the >> right direction: >> >> When I call lastrec.id, it works >> When I call lastrec.created_at it gives me (undefined method >> `created_at' for nil:NilClass) >> >> Any ideas?

Re: [Rails] how database driven content localization is done?

2010-03-11 Thread Ivan Nastyukhin
show source of I18n , and use placeholders. No problem __ Best Regards, Dieinzige On Mar 11, 2010, at 10:14 PM, karikrishni wrote: > Hi, > > We are developing a site which needs to be localized, But we store the > content into the database records. Anyone has ideas about how to > localize a data

[Rails] how database driven content localization is done?

2010-03-11 Thread karikrishni
Hi, We are developing a site which needs to be localized, But we store the content into the database records. Anyone has ideas about how to localize a database based application? It should not use the google translate. Instead the content author shall provide multiple language content. Any examp

[Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
(rdb:1) list [683, 692] in /usr/lib/ruby/1.8/mkmf.rb 683 # 684 # For example, if have_header('foo.h') returned true, then the HAVE_FOO_H In trying to debug this, I am not sure if setting a breakpoint inside of a block and not reaching it means that code never executed or could it be peculia

[Rails] Re: Find Last Errors

2010-03-11 Thread Aldric Giacomoni
Chris Kalaboukis wrote: > Hi guys: This is driving me crazy. Can someone please point me in the > right direction: > > When I call lastrec.id, it works > When I call lastrec.created_at it gives me (undefined method > `created_at' for nil:NilClass) > > Any ideas? Thanks for your help! If you look

[Rails] Find Last Errors

2010-03-11 Thread Chris Kalaboukis
Hi guys: This is driving me crazy. Can someone please point me in the right direction: I'm trying to get the last record from my table. Every time I do this, it tells me there is no method, other than id. theconditions = "criteria = '"+t+"'" lastrec = Capture.last(:all, :conditions => theconditio

[Rails] Re: load seeds.rb in test and no truncating data

2010-03-11 Thread Heinz Strunk
Is there any command to copy the development database to the test database? Not the schema, the database itself. -- 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

[Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
> > getcwd failure seems to indicate that your current path is a directory > that no longer exists (like it was deleted) > > cd / > > then try again > That was strange as 'ls' showed I was in a directory, but that fixed that problem, but after the reinstall I still have the same problem: al

Re: [Rails] scite on Ruby 1.9

2010-03-11 Thread Sandip Ransing
Scite comes as separate application. You need to install it. On Thu, Mar 11, 2010 at 10:08 PM, Keletiki Kel wrote: > Hi everybody, > I am a novice in programming and I am actually having fun with Ruby. > With Ruby 1.8.6, scite works well. However, this helpful tool does not > come with Ruby 1.9.

Re: [Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Craig White
On Thu, 2010-03-11 at 09:48 -0800, Jedrin wrote: > > Try removing and re-installing the postgresql-devel package > > > > yum remove postgresql-devel > > yum install postgresql-devel > > > > Ok, I just did that, but I am having a problem that my gem command is > not working all of a sudden. > I ha

[Rails] Re: Where to find plugins?

2010-03-11 Thread Aldric Giacomoni
Ravindra Singh wrote: > Use github and gemcutter and rubyforge Alright.. So there isn't a magical place for it (yet). 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 grou

[Rails] Re: Data Type Question

2010-03-11 Thread RavionRails
if you have integer type fields than how can you save float value in it. On Mar 11, 10:28 am, Yudi Soesanto wrote: > Here is my situation, > > In the database, I have a *stats* table which has: > - points (Integer datatype) > - assists (Integer datatype) > - blocks (Integer datatype) > - turnover

[Rails] JOBS: Team Leader and Developers Required

2010-03-11 Thread Anetara Solutions
Foxfire India is looking for candidates to add to its Ruby on Rails Development team on a long term basis. An ideal candidate should meet the following criteria: • Proven RoR Agile development experience. • At least 2 to 3 years of experience in Rails development. • Demonstrate a

Re: [Rails] Determine if part of a hash key exists

2010-03-11 Thread Pedro Fernandes Steimbruch
h.each_key.collect {|k| k if k.to_s.include?('school') } irb(main):007:0> h = {:school_name => 'RoR School', :school_address => 'RoR Street'} => {:school_name=>"RoR School", :school_address=>"RoR Street"} irb(main):008:0> h.each_key.collect {|k| k if k.to_s.include?('school') } => [:school_name, :

[Rails] Re: Where to find plugins?

2010-03-11 Thread RavionRails
Use github and gemcutter and rubyforge On Mar 10, 8:46 pm, Anthony Gardner wrote: > Github might be your friend > > On 10 March 2010 14:27, Aldric Giacomoni wrote: > > > > > Is there another place than agilewebdevelopment.com/plugins to find a > > list of Rails plugins? > > -- > > Posted viahttp

[Rails] Rails & HTMLDoc - Error: Cannot allocate memory - htmldoc

2010-03-11 Thread Sergey Radchev
Hi Guys, I'm converting HTML file by HTMLDoc and I'm getting the error below. Does anyone know how to solve this problem? HTML filesize: 7.5 MB Thanks, Error Message: -- Errno::ENOMEM: Cannot allocate memory - htmldoc --bodycolor white -- bodyfont Helvetica --bottom 1cm --footer ..1

[Rails] {JOBS} RoR Developers (Senior and Junior) Tottenham Court Road, London

2010-03-11 Thread chriswma...@hotmail.com
I'm hiring Ruby on Rails Developers for the Tottenham Court Road area, London. Here's some information: Working for a global online services organisation, the Senior Ruby on Rails Developer will design and develop large web based business applications, products and tools to support the EU busines

[Rails] Re: getting the id of selected radio button

2010-03-11 Thread RavionRails
you have to add the r.id to the link dynamically which can be used by javascript . onclick the radio button you have to add '? contact_reference_id=checked element id' On Mar 11, 11:33 am, Nitin Rajora wrote: > Try this... > INSIDE VIEW - >

[Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
> Try removing and re-installing the postgresql-devel package > > yum remove postgresql-devel > yum install postgresql-devel > Ok, I just did that, but I am having a problem that my gem command is not working all of a sudden. I had also tried to debug the extconf.rb, I had stepped inside a functi

Re: [Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Craig White
On Thu, 2010-03-11 at 09:11 -0800, Jedrin wrote: > so I have these files in one place: > > /usr/include/pgsql/internal/libpq-int.h > /usr/include/pgsql/server/libpq/libpq-be.h > /usr/include/pgsql/server/libpq/libpq.h > /usr/include/pgsql/server/libpq/libpq-fs.h > > and then I have this file here

[Rails] load seeds.rb in test and no truncating data

2010-03-11 Thread Heinz Strunk
Hello, I need to load the seeds.rb into my test environment in order to test the controllers. I just added: require "#{Rails.root}/db/seeds.rb" to test_helper.rb But, of course, it's seeding the data whenever I test something. The seeds.rb is quite big and takes about 2 minutes to load so when

[Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
so I have these files in one place: /usr/include/pgsql/internal/libpq-int.h /usr/include/pgsql/server/libpq/libpq-be.h /usr/include/pgsql/server/libpq/libpq.h /usr/include/pgsql/server/libpq/libpq-fs.h and then I have this file here: /usr/include/libpq-fe.h I don't know if that means I have som

[Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
> try > > yum install postgresql-devel > I allready have that: yum install postgresql-devel Loaded plugins: presto, refresh-packagekit Setting up Install Process Package postgresql-devel-8.4.2-1.fc12.i686 already installed and latest version Nothing to do The file is here: /usr/include/libpq-fe

[Rails] we need this (codebubbles)

2010-03-11 Thread Julian Leviston
I think something like this would benefit Ruby & Rails development a huge amount. I miss the capacities the Smalltalk (+Self) browsers enabled the facilitation of. The disadvantage was that it was an "entire closed world" but this is a more open idea... also it seems to integrate with Eclipse,

Re: [Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Craig White
On Thu, 2010-03-11 at 08:33 -0800, Jedrin wrote: > so I did: > > yum install ruby-devel.i686 > > now I get: can't find libpq-fe.h. try yum install postgresql-devel Craig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. --

[Rails] scite on Ruby 1.9

2010-03-11 Thread Keletiki Kel
Hi everybody, I am a novice in programming and I am actually having fun with Ruby. With Ruby 1.8.6, scite works well. However, this helpful tool does not come with Ruby 1.9. My question is to know how I can make scite works with Ruby 1.9 It's a real pain in my neck actually. Thank you in advance fo

[Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
so I did: yum install ruby-devel.i686 now I get: can't find libpq-fe.h. gem install pg -- --with-pgsql-include-dir=/usr/include/pgsql --with- pgsql-lib-dir=/usr/lib/pgsql Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem nati

[Rails] Re: How to hide an object???

2010-03-11 Thread Guille San
Hi Robert: First of all I want to thank you for all the time you are spending helping me. > I also just noticed that once you get the hide() working, you have > nothing in your script to show it again. You are trying to make an AJAX > call to update it's contents every second, but the element w

[Rails] Re: trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
I tried to run this with the debuger: ruby -r debug extconf.rb --with-pgsql-include-dir=/usr/include/pgsql -- with-pgsql-lib-dir=/usr/lib/pgsql this block of code in /usr/lib/ruby/1.8/mkmf.rb is where the error happens topdir = File.dirname(libdir = File.dirname(__FILE__)) extdir = File.expand_p

[Rails] Re: bad url in js script

2010-03-11 Thread Erwin
I believe the problem is linked to using a sub-uri in production the /dist folder is search at the application root not at the relative url need more inquiries On 11 mar, 15:45, Erwin wrote: > When running in development env, I don't have this problem, only in > production... > > I have a view i

[Rails] Re: dom:loaded problems

2010-03-11 Thread Guille San
Robert Walker wrote: > Guille San wrote: >> Hi everybody: >> I was trying use dom:loaded, but I read in the Api of prototype that >> this function load all HTML code except the images. My problem is that >> all my web is an image and I want that it were full loaded before the >> webpage shows it, b

[Rails] Re: dom:loaded problems

2010-03-11 Thread Robert Walker
Guille San wrote: > Hi everybody: > I was trying use dom:loaded, but I read in the Api of prototype that > this function load all HTML code except the images. My problem is that > all my web is an image and I want that it were full loaded before the > webpage shows it, because that I want that it s

Re: [Rails] dom:loaded problems

2010-03-11 Thread Christophe Decaux
What you are facing is the classic image loading issue. I think the following code should help you, I found it sometime ago it is based on this page : http://www.webreference.com/programming/javascript/gr/column3/ Basically, you need to have - an array with url's for your big images such

[Rails] Re: integrate google ads in rails application

2010-03-11 Thread John Goewert
Besides you plugging your adsense link straight in to your view, there is a plugin for it. http://github.com/JasonKing/google_ad_sense On Mar 11, 12:52 am, mahesh s wrote: > Hi friends > >    I would like to integrate the google ads to my project please give some > idea to how to integrate the

[Rails] Re: How to hide an object???

2010-03-11 Thread Robert Walker
Robert Walker wrote: > Guille San wrote: >> >> >> function lastSpy() { >> >> var target = $('imagen'); >> >> if (!target) return false; >> new Ajax.PeriodicalUpdater(target, >> 'http://localhost:3000/',{frequenc

[Rails] dom:loaded problems

2010-03-11 Thread Guille San
Hi everybody: I was trying use dom:loaded, but I read in the Api of prototype that this function load all HTML code except the images. My problem is that all my web is an image and I want that it were full loaded before the webpage shows it, because that I want that it seems like a video and if it

[Rails] Re: How to hide an object???

2010-03-11 Thread Robert Walker
Guille San wrote: > Hi everyone: > > I probe to use the function that Frederick says, but it doesn´t work > because mi image don´t load the new periodical image. Where I´m doing > something wrong?? > > > > function lastSpy() { > > var target = $('imagen'); > > if (!t

[Rails] trying to install postgres gem on fedora 12 ..

2010-03-11 Thread Jedrin
I get these errors : gem install pg -- --with-pgsql-include-dir='/usr/include/pgsql' -- with-pgsql-lib-dir='/usr/lib/pgsql' Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb --with-p

[Rails] Re: Call a controller method from a view

2010-03-11 Thread Greg Ma
Hi, Thanks it works better now. But how am i supposed to access my textfield if I am using a get method in my controller? Route: map.resources :products, :member => {:add_ingredient => :post } Controller: <%= text_field_with_auto_complete :product, :ingredient_name,{}, {:url => formatt

[Rails] Re: Making Rails interract with external sites / JS processing

2010-03-11 Thread Tom Pett
Bump... Anyone? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-

[Rails] Re: How to hide an object???

2010-03-11 Thread Guille San
Hi everyone: I probe to use the function that Frederick says, but it doesn´t work because mi image don´t load the new periodical image. Where I´m doing something wrong?? function lastSpy() { var target = $('imagen'); if (!target) return false; new Ajax.Periodic

[Rails] Re: Suggest a wav or aiff player

2010-03-11 Thread Robert Walker
Srikanth Jeeva wrote: > Thanks a lot .. > this helped me so much.. You should also be aware that supporting audio and video on the web is undergoing a significant change in the transition from HTML 4.01 to HTML5. HTML5 includes a couple of new tags and . Several modern browsers (Safari, Googl

[Rails] Re: Accessing subversion(svn) from rails application

2010-03-11 Thread Sijo k g
Hi You can by using any svn client. Which OS you use? Sijo -- 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 unsubscrib

[Rails] acts_as_tree test fails : duplicate entry # for key #

2010-03-11 Thread steve.gooberman-hill
Hi, I've set up a model as follows class EquipmentPrice < ActiveRecord::Base acts_as_tree :order => "id" ... end which has the following db migration class CreateEquipmentPrices < ActiveRecord::Migration def self.up create_table :equipment_prices do |t| t.integer :id t

Re: [Rails] Re: Bypassing automatic STI generation

2010-03-11 Thread Michael Pavling
On 11 March 2010 14:39, Fernando Perez wrote: >> But it *is* a Membership object... ?:-/ >> > It's a Membership indeed, but in the admin section of my app, I don't > need to recode a specific controller for memberships, they can use the > products_controller which is fine and defining :controller

[Rails] bad url in js script

2010-03-11 Thread Erwin
When running in development env, I don't have this problem, only in production... I have a view in which a js script display a FlowPlayer video player (+ plugins)... the flash files are located in the /public/dist folder, ant the script calls them like that :

[Rails] Re: Bypassing automatic STI generation

2010-03-11 Thread Fernando Perez
> But it *is* a Membership object... ?:-/ > > But if you *have* to have it as a Product for some reason, you can use > the ActiveRecord::Base "becomes" method: > http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M002334 It's a Membership indeed, but in the admin section of my app, I don't

[Rails] rendering simple html from view/controller

2010-03-11 Thread adedip
I start apologies for the silly question..but: how do I show the content of a view in a controller by url I mean why, with the starting rails conf and I simple scaffold done, i can't do root/:controller/:action and see the action.html.erb content? it warns me writing "Couldn't find Product with ID=

Re: [Rails] Bypassing automatic STI generation

2010-03-11 Thread Michael Pavling
On 11 March 2010 14:26, Fernando Perez wrote: > Is it possible to tell rails to not care about STI and to simply return > a Product object? But it *is* a Membership object... ?:-/ But if you *have* to have it as a Product for some reason, you can use the ActiveRecord::Base "becomes" method: http

[Rails] Bypassing automatic STI generation

2010-03-11 Thread Fernando Perez
Hi, Let's say I have the following: Product < AR Memberships < Product I know that the product with id 10 has its type column set to "Membership", but still I'd like to treat it as a regular product. So if I do: Product.find(10), Rails returns a Membership object. Is it possible to tell rails

[Rails] Re: Re: Master thesis topic on Ruby or ROR

2010-03-11 Thread Aldric Giacomoni
Ar Chron wrote: > > Looks like you have some potential topics there. Write about what you > are interested in, you'll do a better job. Exactly! > > >> Hey Aldric Giacomoni, >> - What is "Monkeys with typewriters"? > > Pay no attention to Aldric... he forgot the 'Flying' part... *shy grin* --

[Rails] Re: ActionMailer - attaching a PDF

2010-03-11 Thread Fernando Alonso
Hey, here's an example, def mailer_method(mymodel) content_type "multipart/alternative" part :content_type => "text/html", :body => mymodel.text attachment "application/pdf" do |a| a.filename = mymodel.pdf_filename a.body = mymodel.pdf_render.render end Take a look on the "content_

[Rails] Re: PDF document viewer in rails

2010-03-11 Thread Fernando Alonso
Check http://googlesystem.blogspot.com/2009/09/embeddable-google-document-viewer.html It's really simple, and it isn't Flash, just add into the view, "http://docs.google.com/gview?url=#{YOUR_PDF_URL}&embedded=true"; style="width:600px; height:500px;" frameborder="0">" Fernando Marnen Laibow-Ko

[Rails] Re: Re: Master thesis topic on Ruby or ROR

2010-03-11 Thread Ar Chron
Bayarbuyan Ulziit wrote: > Well, my curiosity is around: > > - Mixing or Juxtaposition of Java and Ruby > - Network, Distributed Programming with Ruby > - Metaprogramming > - Rapid development > - Testing, Optimization of web applications on ROR Looks like you have some potential topics there. Wr

Re: [Rails] Recommend CMS systems on rails

2010-03-11 Thread John Grimes
Check out Radiant CMS, http://radiantcms.org On 11 March 2010 16:11, karikrishni wrote: > Hi All, > > We are service based company, now start working on ruby on rails > technologies. We need a CMS system with Blog, Events, News, Web Pages, > Video/Podcasts, Emails and possibilities to send sms t

[Rails] Re: Determine if part of a hash key exists

2010-03-11 Thread johnnybutler7
Ye this is what i had come up with hash.keys.collect {|k| k.to_s.include?('schools') } like the regular expression better though, cheers, JB On 11 Mar, 11:50, Michael Pavling wrote: > On 11 March 2010 11:13, johnnybutler7 wrote: > > > > > > > Hi, > > > I have a hash something like {:schools

[Rails] Re: Repeating fields on the same page

2010-03-11 Thread Dudebot
On Mar 11, 2:10 am, Frederick Cheung wrote: > > Does anyone know how I can repeat fields for a model (that would > > insert into different records) in a form?   > As long as you give the fields different names (or nest them in a > different scope, eg with fields_for), then yes. You just need to do

  1   2   >