[Rails] will_paginate pagination problem

2009-11-03 Thread Yazu Yazu
hi; i use will_paginate the first page come true but all other page get the same data of first page i checked in controller page parameter works true but paginate get only first page's data and shows these data in all pages forexample first page seen A,B second page also seen A,B but second page

[Rails] Re: help with auto_complete css (z-index)

2009-11-03 Thread Straff Walton
Dave Dumaresq wrote: I have three fields in a row above a grid of data and I'd like to use autocomplete in these fields; however, the selection list appears *behind* my data grid, which hides the list. Any suggestions about how to override autocomplete css? I've tried plunking some style

[Rails] Re: no way to read image data from database

2009-11-03 Thread Sijo k g
Hi send_data(project_snapshot.db_file.data, :type = project_snapshot.content_type, :filename = project_snapshot.filename, :disposition = 'inline') Can you try here

[Rails] Re: Rails in css ..

2009-11-03 Thread Hemant Bhargava
Works.. My problem .. Newayz thanks for replies .. Frederick Cheung wrote: On Nov 3, 7:22�am, Hemant Bhargava rails-mailing-l...@andreas-s.net wrote: Yups.. @var has value inside it.. and not working .. In what way is it not working ? Fred -- Posted via http://www.ruby-forum.com/.

[Rails] Re: Dynamic Database Connections

2009-11-03 Thread Colin Law
2009/11/3 jmamma jackli...@gmail.com: Hi again Marnen.  I think we're a little off topic. The problem at hand is connecting to multiple databases, not poo poo'ing on the requirements haha! Very often the solution to a problem is to change the approach so that the problem does not exist in

[Rails] Re: File not uploading properly

2009-11-03 Thread Frederick Cheung
On Nov 3, 9:30 am, Raju Aralikatti rails-mailing-l...@andreas-s.net wrote: Thanks for your reply fred, file = File.new(File.join(file_path), wb) file.write(params['file_' + i.to_s].read) You mean to say my code must be like this, file = File.new(File.join(file_path), wb)

[Rails] Re: How to force AR belongs_to include option to eager load?

2009-11-03 Thread Artūras Šlajus
Frederick Cheung wrote: On Nov 2, 10:56�pm, Art�ras �lajus rails-mailing-l...@andreas-s.net wrote: Now the evil thing is, that even thou' :include is specified, it does nothing. New AR eager loading resorts to doing n+1 sql queries in FowSsEntry.for(1,1).each { |fse| fse.solar_system }

[Rails] Re: File not uploading properly

2009-11-03 Thread Wap Addon
In ur form tab write this property = enctype=multipart/form-data -- 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

[Rails] Re: File not uploading properly

2009-11-03 Thread Raju Aralikatti
Thanks for your help, Its working fine now. I used attachment_fu plugin. Thanks, Raju -- 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

[Rails] Domain to sub domain pointer.

2009-11-03 Thread Abhishek shukla
Hello Friends, I have a requirement where a user can configure there own domain. For example We will provide a subdomain to every user who will get registered to our site. For e.g xyz.example.com But if the user already have a domain for example xyz.com he can point that subdomain to

[Rails] Re: Share controller method when rendering partial

2009-11-03 Thread andkjaer
But where shhould the method live? In the Application controller? def twitter_search ... end On 2 Nov., 23:21, Euwyn Poon euwynp...@gmail.com wrote: If I'm not mistaken, you have TwitterController and a DashboardController. You could have a before_filter (to set @twitter_search) in each of

[Rails] Error Is not a module?

2009-11-03 Thread andkjaer
Hi im working with the Twitter gem, suddenly i get this error: Twitter is not a module -- /Users/KAN/.gem/ruby/1.8/gems/twitter-0.7.0/lib/twitter/search.rb:1 vendor/rails/activesupport/lib/active_support/dependencies.rb:368:in `load_without_new_constant_marking'

[Rails] awesome_nested_set help needed

2009-11-03 Thread Ian Drysdale
Hello, I've been using the brilliant awesome_nested_set gem to manage pages and their parents on my app, however I've run into what appears to be a simple challenge... I use the helper nested_set_options to make life easier - however I can't see if there is an easy way I can get it to return a

[Rails] How to print the data?

2009-11-03 Thread suji A
Hi i was create a application for event management. The scaffold automatically create the show edit destroy links How to add the print link and print each event details. Thanks in advance. Regards, Suji A. --~--~-~--~~~---~--~~ You received this

[Rails] Re: Error Is not a module?

2009-11-03 Thread Leonardo Mateo
On Tue, Nov 3, 2009 at 1:50 PM, andkjaer andkjaer@gmail.com wrote: Hi im working with the Twitter gem, suddenly i get this error: Twitter is not a module -- /Users/KAN/.gem/ruby/1.8/gems/twitter-0.7.0/lib/twitter/search.rb:1

[Rails] Re: Error Is not a module?

2009-11-03 Thread andkjaer
I try to use it like this: def twitter_search @twitter_search = Twitter::Search.new('#rails') end On 3 Nov., 14:29, Leonardo Mateo leonardoma...@gmail.com wrote: On Tue, Nov 3, 2009 at 1:50 PM, andkjaer andkjaer@gmail.com wrote: Hi im working with the Twitter gem, suddenly i get

[Rails] Re: Dynamic Database Connections

2009-11-03 Thread Marnen Laibow-Koser
jmamma wrote: Hi again Marnen. I think we're a little off topic. The problem at hand is connecting to multiple databases, not poo poo'ing on the requirements haha! As Colin said, it is entirely appropriate to question the requirements here. You're making your life difficult with these

[Rails] Re: no way to read image data from database

2009-11-03 Thread Marnen Laibow-Koser
daociyiyou wrote: Thanks! My server do not approve the file system store,that is why using the db_file. Find a different server, then, or use S3. Even if you can get this to work, you're asking for trouble. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- Posted via

[Rails] Re: How to print the data?

2009-11-03 Thread Marnen Laibow-Koser
suji A wrote: Hi i was create a application for event management. The scaffold automatically create the show edit destroy links How to add the print link and print each event details. http://guides.rails.info Thanks in advance. Regards, Suji A. Best, -- Marnen

[Rails] Success in Observe field

2009-11-03 Thread Srinath A.
Hi, How to call javascript function using success in observe field . %= observe_field (ha.id, :frequency = 0.5, :update = article_list_#{ha.id}, :url = {:action = :auto_complete_for_article_title, :id = ha.id}, :with = 'article='+ escape(value),

[Rails] Can not put @ when debuging with Windows XP Home Edition

2009-11-03 Thread Albert Catala
Hello, I have problems when I debug, buy only with a Laptop with XP Home Edition Here is my problem: when I debug I cann hot print @, [ ] { special characters. (see attached image) I have been looking for solutions in google... but I only found some similar issues about the ruby console

[Rails] Re: RedCloth error

2009-11-03 Thread anton effendi
add in enviroment.rb config.gem RedCloth On Tue, Nov 3, 2009 at 6:55 PM, Smit Shah rails-mailing-l...@andreas-s.netwrote: Hi All I have installed RedCloth 4.2.2 4.2.1. When I tried to create new post in forum(of my application) it gives me error like uninitialized constant

[Rails] Re: will_paginate pagination problem

2009-11-03 Thread Rick
You should replace your will_paginate gem, it's obsolete. 1) gem uninstall will_paginate 2) gem install gemcutter 3) gem tumble 4) gem install will_paginate This will give you will_paginate (2.3.11) which is equivalent to mislav-will_paginate. Refer to

[Rails] Re: Error Is not a module?

2009-11-03 Thread Leonardo Mateo
On Tue, Nov 3, 2009 at 2:31 PM, andkjaer andkjaer@gmail.com wrote: I try to use it like this: def twitter_search     @twitter_search = Twitter::Search.new('#rails') end OK, I haven't used the Twitter gem, so I don't know the right syntax, but you're certainly using it as a module. Are

[Rails] Re: Domain to sub domain pointer.

2009-11-03 Thread tommy xiao
Maybe use awesome plugin: http://github.com/mbleigh/subdomain-fu Let’s say my domain is ‘intridea.com’. Here are some examples of the use of the :subdomain option: url_for(:controller = my_controller, :action = my_action, :subdomain = awesome) # =

[Rails] Re: will_paginate pagination problem

2009-11-03 Thread tommy xiao
provide demo using ajax paginate: http://www.box.net/shared/rufuee2ldm 2009/11/3 Rick richard.t.ll...@gmail.com You should replace your will_paginate gem, it's obsolete. 1) gem uninstall will_paginate 2) gem install gemcutter 3) gem tumble 4) gem install will_paginate This will give

[Rails] Re: Error Is not a module?

2009-11-03 Thread andkjaer
I don't know if im using it the right way, i can't find any examples. The DOC for the GEM is here: http://twitter.rubyforge.org/ And the GEM at github: http://github.com/jnunemaker/twitter On 3 Nov., 15:56, Leonardo Mateo leonardoma...@gmail.com wrote: On Tue, Nov 3, 2009 at 2:31 PM, andkjaer

[Rails] Re: Error Is not a module?

2009-11-03 Thread Leonardo Mateo
On Tue, Nov 3, 2009 at 4:09 PM, andkjaer andkjaer@gmail.com wrote: I don't know if im using it the right way, i can't find any examples. The DOC for the GEM is here: http://twitter.rubyforge.org/ There are examples listed on the page you listed above. There's even a link to a sample rails

[Rails] Re: Error Is not a module?

2009-11-03 Thread andkjaer
I know and have looked at it, but i still can't see how to use it! The example shows the oAuth feature - but I just want to use the search functions. On 3 Nov., 16:21, Leonardo Mateo leonardoma...@gmail.com wrote: On Tue, Nov 3, 2009 at 4:09 PM, andkjaer andkjaer@gmail.com wrote: I don't

[Rails] Re: Gem::RemoteFetcher::FetchErro when installing rails

2009-11-03 Thread Rick
You may be hitting a busy site and timing out. You could try re- ordering the sources listed in your .gemrc file or just add gemcutter (http://gemcutter.org/) and give that a try. I'm not sure what to suggest for best order. For reference, here's what my .gemrc looks like right now: $ cat

[Rails] gem server doc page has broken rdoc link for rails

2009-11-03 Thread Peter
Yup, newbie. Working my way through the Agile ... Rails book and updated gem, rails, rake, and sqlite3 as per the book instructions. Then tried out the nifty gem server command to access the documentation. Everything is there except the rails rdoc link is broken:

[Rails] Problem with gem install and rails update

2009-11-03 Thread Dario Pirola
Hi everyone. I'm new to Rails and have been trying to learn something listening to Ryan Bates' podcast. I have tried to install the authlogic gem, inserting the extension as a dependency in the environment.rb file as requested. But, when I run 'sudo rake gems:install' I get an error: wrong

[Rails] Re: Working round 'invalid byte sequence'

2009-11-03 Thread Toby Rodwell
Matt Jones wrote: On Nov 2, 5:31�pm, Toby Rodwell rails-mailing-l...@andreas-s.net wrote: this issue? �Without being an expert in this area (obviously) I guess that either I can try to tell Ruby to treat the MySQL data as an encoding other than UTF-8 (I guess US-ASCII �but it could be trial

[Rails] Simultaneous long-running tasks; Rake, Daemons, Delayed::Jobs?

2009-11-03 Thread Sebastian von Conrad
Hi everyone, I have an application where an essential part is communicating with a remote API via SOAP. I want to be able to run 3-4 of these tasks at once, and one task might take anything from one minute to several hours, depending on the size of the data being sent. The app relies heavily on

[Rails] How to remove a gem

2009-11-03 Thread RVince
I would like to remove (uninstall) a particular gem. I installed the gem creator's beta copy of their next release, but it's problematic, and I neet to revert to the most recent stable version. How might i uninstall a particular gem? --~--~-~--~~~---~--~~ You

[Rails] Mapping a resource to a subdirectory controller

2009-11-03 Thread Jake Boxer
My app (like so many others) has an admin section, which uses controllers inside an admin directory. To keep it simple, I'm only administering the User resource for now. I have a controller that looks like this: code class Admin::UsersController ApplicationController # normal scaffold methods

[Rails] Re: Error Is not a module?

2009-11-03 Thread andkjaer
Is i did :O( BIG MISTAKE! But still what is the right way to use a gem like this? Is it really the right way to call the search method? def twitter_search @twitter_search = Twitter::Search.new('#rails') end On 3 Nov., 18:33, Frederick Cheung frederick.che...@gmail.com wrote: On Nov 3,

[Rails] Call for speakers - ConFoo Montréal Ruby Tra ck

2009-11-03 Thread Sylvain Carle
Hi folks, I'm coordinator for the Ruby track at ConFoo.ca, a major Web development conference featuring a very large array of Web related subjects including PHP, Python, Ruby, standards, security, scaling, and system administration, March 10-12 2010. We are looking for great speakers for the

[Rails] Re: Error Is not a module?

2009-11-03 Thread Frederick Cheung
On Nov 3, 12:50 pm, andkjaer andkjaer@gmail.com wrote: Hi im working with the Twitter gem, suddenly i get this error: Twitter is not a module One vague stab in the dark: do you define a class of your own called Twitter ? Fred --~--~-~--~~~---~--~~ You

[Rails] Re: Foreign keys not being saved by nested forms

2009-11-03 Thread Todd A. Jacobs
On Tue, Nov 03, 2009 at 02:06:32PM -0800, Frederick Cheung wrote: Your associations are back to front - users has a contact_id column, so user belongs_to contact, not has_one (ditto contacts and address_id) Thanks, that fixed it. I think my difficulty is that, while has_many generally makes

[Rails] Re: Working round 'invalid byte sequence'

2009-11-03 Thread Frederick Cheung
On Nov 3, 10:09 pm, Marnen Laibow-Koser rails-mailing-l...@andreas- s.net wrote: Toby Rodwell wrote: [...] Many thanks for the reply Matt.  I used the console to determine that the db is serving up ASCII-8BIT e = Equipment.find(:first, :conditions = ['id = ?', 1234]) e.name.encoding

[Rails] Re: Mysql::Error: query: not connected

2009-11-03 Thread Dhruva Sagar
I've recently faced the same problem. What I understood from the pages I visited from google was that the rails 2.3.3 which I had installed on my windows xp machine didn't work properly with the mysql driver (libmysql.dll). I had to download a different version and add it in c:\ruby\bin I will be

[Rails] Mysql::Error: query: not connected

2009-11-03 Thread Zovar
Hi there! I am PHP developer and trying to learn ROR. Currently I am building my first Rails website (OS X Snow Leopard, TextMate) and decided to switch from sqlite to mysql. After many-many hours of searching the internet I managed to install mysql gem. Now I get this error when I try to run

[Rails] Re: Mysql::Error: query: not connected

2009-11-03 Thread Zovar
Hi Dhruva, thanks for your reply. This is exactly what I am talking about. The problem is, that this recommendation to copy mysql dll file won't work on OS X. That's why I am stuck. I followed Rails tutorials to install mysql gem and now it turns out that Rails doesn't work with it's own gem.

[Rails] Replacement for backgroundrb?

2009-11-03 Thread PeteSalty
We currently run backgroundrb to do a few things that need to happen every minute or so, i.e. check for email from a Google email account, re-index Xapian, that kind of thing. BackgroundRB has served us well but it's kind of a memory hog and we'd really like to investigate the possibility for

[Rails] Re: Problem with gem install and rails update

2009-11-03 Thread Matt Jones
On Nov 3, 9:58 am, Dario Pirola xers...@gmail.com wrote: Hi everyone. I'm new to Rails and have been trying to learn something listening to Ryan Bates' podcast. I have tried to install the authlogic gem, inserting the extension as a dependency in the environment.rb file as requested. But,

[Rails] Re: Working round 'invalid byte sequence'

2009-11-03 Thread Marnen Laibow-Koser
Frederick Cheung wrote: [...] This is not about the database itself this is to do with the interaction between the mysql driver and the new string encoding schemes - strings in ruby 1.9 are encoding aware and from what I gather the mysql driver creates strings with the ascii-8bit encoding

[Rails] [JOBS] : Management consulting firm seeking Social Software expert

2009-11-03 Thread Port Lib Soccer
what : Long Term contract Opportunity with Top Tier Management Consulting firm Where: NYC Compensation :120-150K salary Client is looking for high end technologist with heavy Social Networking and Web 2.0 expeirence. Web development in an open source environment Must have an active technology

[Rails] Re: Foreign keys not being saved by nested forms

2009-11-03 Thread Frederick Cheung
On Nov 3, 9:39 pm, Todd A. Jacobs tjacobs-sndr- b4f...@codegnome.org wrote: but while the form will accept the data, nothing is populating the foreign keys. In other words, I end up with unassociated records in the database, when I'm actually expecting the records of the nested form to be

[Rails] Re: Mysql::Error: query: not connected

2009-11-03 Thread Frederick Cheung
On Nov 3, 10:02 pm, Zovar peter.zavor...@gmail.com wrote: Hi there! I am PHP developer and trying to learn ROR. Currently I am building my first Rails website (OS X Snow Leopard, TextMate) and decided to switch from sqlite to mysql. After many-many hours of searching the internet I

[Rails] Re: best way to organize the DB for my app

2009-11-03 Thread Jeff Tucker
Interesting design. My two cents are that you should avoid putting the html and css in the database, as you'll likely see performance problems as your site grows. Instead, I would recommend you store the custom html and css in discrete files on the filesystem. I don't know of any plugins/gems

[Rails] Re: File upload failed. Try a different image?

2009-11-03 Thread RubyonRails_newbie
SUCCESS W!!! :-) It turns out my convert is stored in /usr/local/bin/convert however the action in the tutorial sets it as: usr/bin/convert. Avatar is now uploaded. Thanks for the response though!!! On 3 Nov, 21:44, RubyonRails_newbie craigwest...@googlemail.com wrote: Yeah -

[Rails] Re: Working round 'invalid byte sequence'

2009-11-03 Thread Marnen Laibow-Koser
Toby Rodwell wrote: [...] Many thanks for the reply Matt. I used the console to determine that the db is serving up ASCII-8BIT e = Equipment.find(:first, :conditions = ['id = ?', 1234]) e.name.encoding = #Encoding:ASCII-8BIT I then set the encoding in /config/database.yml to 'ascii'

[Rails] Re: How to remove a gem

2009-11-03 Thread Hassan Schroeder
On Tue, Nov 3, 2009 at 5:55 PM, RVince rvinc...@hotmail.com wrote: How might i uninstall a particular gem? You *might* start with `gem --help` FWIW, -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan --~--~-~--~~~---~--~~

[Rails] best way to organize the DB for my app

2009-11-03 Thread Erik Peterson
I'm working on an app that allows users to customize an HTML design template to suit their needs. The user will be able to customize css through a graphical interface and then output an HTML for their usage. The basic idea is that each 'design' would have a variety of canned 'styles' or the user

[Rails] Foreign keys not being saved by nested forms

2009-11-03 Thread Todd A. Jacobs
I have the following included in my schema: create_table users, :force = true do |t| t.string login t.string first_name t.string last_name t.string email t.string password t.integer contact_id t.datetime created_at t.datetime updated_at end

[Rails] Re: Mapping a resource to a subdirectory controller

2009-11-03 Thread Jake Boxer
P.S. Sorry about the code tags. I was hoping they'd work, but I guess not. Hopefully their intent is clear. --~--~-~--~~~---~--~~ 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: File upload failed. Try a different image?

2009-11-03 Thread RubyonRails_newbie
Yeah - Although i'm new to this, I guessed its got up to the point where it checks directories, and converts the image into a thumb. If it hasn't converted them, it throws the error. Thats how i read it. If that's wrong, fair enough, but I'm not sure how exactly to resolve this On 3 Nov,

[Rails] Re: Mysql::Error: query: not connected

2009-11-03 Thread Zovar
Hi Fred, thanks for you reply. My database.yml: development: adapter: mysql encoding: utf8 database: dom pool: 5 username: my_username password: my_password socket: /tmp/mysql.sock (same settings both for test and production environments just for now) if I run ruby

[Rails] Re: How to remove a gem

2009-11-03 Thread Conrad Taylor
On Tue, Nov 3, 2009 at 5:55 PM, RVince rvinc...@hotmail.com wrote: I would like to remove (uninstall) a particular gem. I installed the gem creator's beta copy of their next release, but it's problematic, and I neet to revert to the most recent stable version. How might i uninstall a

[Rails] Re: errornous WSDL output for complex type

2009-11-03 Thread Matt Jones
Not sure if you'll get much help on this; 1.2.6 is over 2 years old now, and there's been a pretty big move away from the whole WSDL/SOAP system. You may want to take a look at this project, which brings ActionWebService into Rails 2.3-land: http://github.com/datanoise/actionwebservice --Matt

[Rails] Re: RedCloth error

2009-11-03 Thread Smit Shah
anton effendi wrote: add in enviroment.rb config.gem RedCloth On Tue, Nov 3, 2009 at 6:55 PM, Smit Shah rails-mailing-l...@andreas-s.netwrote: Any idea??? -- Posted via http://www.ruby-forum.com/. -- Senior Rails Developer Anton Effendi - Wu You Duan Thanks for your

[Rails] Re: How to remove a gem

2009-11-03 Thread Rick
If you know the version (gem list GEMNAME) then you can: gem uninstall GEMNAME --version=VERSION i.e.: gem list test-unit *** LOCAL GEMS *** test-unit (2.0.5, 1.2.3) gem uninstall test-unit --version=1.2.3 Successfully uninstalled test-unit-1.2.3 On Nov 3, 9:23 pm, Conrad Taylor

[Rails] Re: File upload failed. Try a different image?

2009-11-03 Thread Frederick Cheung
On Nov 3, 9:29 pm, RubyonRails_newbie craigwest...@googlemail.com wrote: However - i dont understand why this hasn't uploaded... Anyone else had this problem??? Have you tried stepping through the code and seeing at which point this fails? Fred Thanks a lot for reading!

[Rails] Re: Working round 'invalid byte sequence'

2009-11-03 Thread Matt Jones
On Nov 2, 5:31 pm, Toby Rodwell rails-mailing-l...@andreas-s.net wrote: I am a very amateur Rubyist who, amongst other things, likes to use a simple Rails app to query my company's MySQL config database.  The server I now use to do this has got 1.9.1 and Rails 2.3.3.  I've now hit the

[Rails] Re: Foreign keys not being saved by nested forms

2009-11-03 Thread tommy xiao
hi,same here,i cant resove this problem.But i found a demo ,that's awesome. http://github.com/anathematic/has_one_problem 2009/11/4 Todd A. Jacobs tjacobs-sndr-b4f...@codegnome.org For example, in my case a contact has a foreign key to an address. The address belongs to the contact (not the

[Rails] The error occurred while evaluating nil.prefetch_primary_key

2009-11-03 Thread Markus Goedeke
The error occurred while evaluating nil.prefetch_primary_key? Hi, I have a problem with a model when I have 3 belongs_to relations in one the middle. This example is a subset of a grid-routing project: n 1 1 n + Project

[Rails] Re: Error Is not a module?

2009-11-03 Thread andkjaer
Dosen't anybody know how to use the GEM? Thanks... On 3 Nov., 19:08, andkjaer andkjaer@gmail.com wrote: Is i did :O( BIG MISTAKE! But still what is the right way to use a gem like this? Is it really the right way to call the search method? def twitter_search     �...@twitter_search

[Rails] Re: Replacement for backgroundrb?

2009-11-03 Thread Peter De Berdt
On 04 Nov 2009, at 01:21, PeteSalty wrote: We currently run backgroundrb to do a few things that need to happen every minute or so, i.e. check for email from a Google email account, re-index Xapian, that kind of thing. BackgroundRB has served us well but it's kind of a memory hog and we'd