[Rails] Re: Two models with restful_authentication

2009-03-18 Thread Vojto
Try to load up script/console, and check if user.category_ids= [1,3,6,...] works .. On 19. Mar., 07:38 h., Indu RS wrote: > Hai everyone, > I am using restful_authentication plugin in my project. The relation > between the category and user is has_and_belongs_to_many. So I created > another tabl

[Rails] Re: Rails Version

2009-03-18 Thread ruby...@ymail.com
On 19 Mar., 07:12, NARAYANAN CJ wrote: > hi there, > > Can i have two version of rails 2.2.2 and 1.2.3 on the same executable > location. Is that possible It is possible to have two version of the Rails gem installed but the "rails" executable will always be replaced when installing another ve

[Rails] Two models with restful_authentication

2009-03-18 Thread Indu RS
Hai everyone, I am using restful_authentication plugin in my project. The relation between the category and user is has_and_belongs_to_many. So I created another table category_users with category_id and user_id as fields. In my view i specified like the following. <% for category in Category.fin

[Rails] Re: Google Latitude in Ruby on Rails

2009-03-18 Thread Angappan Ayyavoo
saideep annadatha wrote: > How would you want to use the latitude? > > Previously, we have calculated the latitude and longitude with > Javascript > functions according to the place given and stored the values in a > database. > > So, what is it exactly are you trying to do? > > On Tue, Mar 1

[Rails] Rails Version

2009-03-18 Thread NARAYANAN CJ
hi there, Can i have two version of rails 2.2.2 and 1.2.3 on the same executable location. Is that possible regards, Narayanan.cj. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To po

[Rails] video upload

2009-03-18 Thread krishna
Hello friends Can anybody let me know what is easiest way of video uploading.. --~--~-~--~~~---~--~~ 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@google

[Rails] Release mapademexicali.com APP (source code, db, etc)

2009-03-18 Thread Bernardo Bernardoguruc
Hi community, i just want to share this app. is same of www.mapademexicali.com http://www.mediafire.com/file/jygvja...2008.part1.rar http://www.mediafire.com/file/jonmt2...2008.part2.rar http://www.mediafire.com/file/ydn1dm...2008.part3.rar http://www.mediafire.com/file/zhtzjy...2008.part4.rar

[Rails] Re: Problem with restful_authentication

2009-03-18 Thread Indu RS
Freddy Andersen wrote: > What is the error that you get? Does it say you are not allowed to > mass assign this (country_id) variable? > > Have a look in your user model where you have the attr_accessible you > are going to have to add :country_id there. Thank you so much for the immediate replay

[Rails] Workling and dependent gems

2009-03-18 Thread Ramon Tayag
Hi there. I'm trying to get Workling running on my staging server, but an "undefined method `get'" error (http://pastie.org/420580). It's a very clean Hardy server without many gems installed, so it must be a missing gem since I don't get that error on my dev box. I was wondering - is there a li

[Rails] Re: Rails 2.3.2 + Lighttpd

2009-03-18 Thread Richard
I dont think many people use lighty and fastcgi these days, you may be better off switching to NGINX/mongrel or passenger which most people are doing?? I don't know if lighty will continue being able to run newer versions of rails forever as it seems to be a die-ing web server, sure you could pro

[Rails] Re: Handling database table dependencies

2009-03-18 Thread Richard
Are you talking about a polymorphic association?? You can set that up simply enough in the models after doing a wee search on them, http://envycasts.com/products/advanced-activerecord May have some interesting insight into them, it would then be easy enough to create a method from a before_dest

[Rails] Re: ERB templates in the database

2009-03-18 Thread Richard
I see what you are saying but question that by storing erb templates in the DB would eventually become less flexible at some point in the future?? I can see why it could and why it couldn't... Would not using partials separated into directories by namespace's not work? I guess this depends on h

[Rails] Re: Help! RubyGems is broken!

2009-03-18 Thread Brian Hogan
remove the rubyopt thing from your profile. I have seen that cause this exact error on many systems. Of course, restart your terminal session after changing your profile. :) On Wed, Mar 18, 2009 at 11:58 PM, Richard wrote: > > Could you not try re-installing ruby gems?? > > Cheers > > Richard >

[Rails] Re: Help! RubyGems is broken!

2009-03-18 Thread Richard
Could you not try re-installing ruby gems?? Cheers Richard On Mar 19, 4:36 am, explainer wrote: > I have a problem with RubyGems: > > ruby gt.rb > ruby: no such file to load -- ubygems (LoadError) > > Here are my compiler and gem versions: > > ruby --version >   ruby 1.8.7p5000 (2009-03-03 rev

[Rails] Re: attachmnet_fu can't keep original file image!

2009-03-18 Thread Richard
It may have nothing to do with your situation, but I once had a similar experince when I forgot to install image magick... but I think Ar's advice will probably work Cheers Richard, On Mar 19, 7:00 am, Ar Chron wrote: > Just out of curiousity, add a > >  :resize_to => '5000x5000>', > > before

[Rails] Re: Lin_to_remote and update a text area

2009-03-18 Thread Ram
My suggestion was just a try.Just try everything you can think of with your code. its not going to affect anything else as far as i can see. It would help if you tell us more about what the error was. Take a look at prototype.js api docs. Wouldnt take more than a couple of hours to go through the

[Rails] Re: Using mysql's 'REPLACE' command in active record

2009-03-18 Thread Richard
Thanks for the reply Mark, This is as I thought... :( At least it is sort of do-able, I don't enjoy putting sql in activerecord but sometimes I guess it is needed... Cheers Richard On Mar 19, 1:29 pm, Mark Reginald James wrote: > Richard wrote: > > Is this possible ?? > > Yes, but only with

[Rails] Re: Using mysql's 'REPLACE' command in active record

2009-03-18 Thread Mark Reginald James
Richard wrote: > Is this possible ?? Yes, but only with custom SQL: Model.connection.insert "replace into #{Model.table_name} " -- Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com --~--~-~--~~~---~--~~ You received this message beca

[Rails] Re: set_table_name woes, fragmented domain class

2009-03-18 Thread Mark Reginald James
Michael J. I. Jackson wrote: > I'm running Rails on top of a Mongrel cluster. I have several model > classes that are going to have so many records it is not feasible to > keep them all in the same table. So I've split out the records into > many different tables, each with its own suffix w

[Rails] Calling ActionMailer model from script/console

2009-03-18 Thread Richard Schneeman
I am writing an app that receives emails and forwards them to different locations based on certain criteria. I can recieve emails, and i can send them, i'm just having a problem linking the two together. The mailer model i am using is entitled My_Mailer and under that model i have defined a recei

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread elle
On Mar 19, 1:33 pm, elle wrote: > On Mar 19, 10:14 am, Jeff Schwab wrote: > > > > > > > Jeff Schwab wrote: > > > elle wrote: > > > >> On Mar 19, 9:45 am, Jeff Schwab wrote: > > >>> elle wrote: > > > On Mar 19, 9:27 am, Jeff Schwab wrote: > > > elle wrote: > > >> My ~/.profile ha

[Rails] Soft Ball? Validating either-or fields...

2009-03-18 Thread Ben Wilson
I have a situation where the user will either put text into a text- area or upload a file (ala attachment_fu). I need to check if either field has data (both is okay, too). Any suggestions? thanks in advance. --~--~-~--~~~---~--~~ You received this message because

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread elle
On Mar 19, 10:14 am, Jeff Schwab wrote: > Jeff Schwab wrote: > > elle wrote: > > >> On Mar 19, 9:45 am, Jeff Schwab wrote: > >>> elle wrote: > > On Mar 19, 9:27 am, Jeff Schwab wrote: > > elle wrote: > >> My ~/.profile has: > > ... > >> And my ~/.bash_profile has the foll

[Rails] Re: Missing readline

2009-03-18 Thread Conrad Taylor
Hi, you'll need to install the readline library and you should send a note to the Ruby package maintainer for your platform to add this dependency. Good luck, -Conrad Sent from my iPhone On Mar 18, 2009, at 3:32 PM, Lee wrote: > > I have installed Rails 2.2.2 on a Debian Lenny VPS and I

[Rails] Re: Search Results into new table

2009-03-18 Thread khim sreang
> > Hi all now i am doing with advanced search by using checkboxs and redio > button for each items > for example : <% form_for *:tblpss_description_record*, *...@tblpss_description_record*, * :url*=>{ *:action*=>'view_detail_job_setup' }, *:html*=>{ *:id*=> 'frm_view_setup', *:name*=>'frm

[Rails] Re: Routing to different pages with Ajax login

2009-03-18 Thread Dave L
When I try to add the form element in a partial: <%= f.hidden_field :profile_id, :value => profile_id %> I get an error that f is unknown. Is there a way to add form elements with a partial? On Mar 18, 4:10 pm, Frederick Cheung wrote: > On Mar 18, 10:29 pm, Dave L wrote:> Okay, thats what I

[Rails] Re: newbie confused by div_for

2009-03-18 Thread Alex Chekholko
Philip Hallstrom wrote: > On Mar 18, 2009, at 3:52 PM, Alex Chekholko wrote: > >> >> That doesn't work with error "undefined local variable or method >> `item'" >> >> How do I iterate over the items? > > > <% @player.items.each do |item| %> ><% div_for item do %> > <%= h item.name %>

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread Jeff Schwab
Jeff Schwab wrote: > elle wrote: >> >> On Mar 19, 9:45 am, Jeff Schwab wrote: >>> elle wrote: >>> On Mar 19, 9:27 am, Jeff Schwab wrote: > elle wrote: >> My ~/.profile has: > ... >> And my ~/.bash_profile has the following: > ... >> What rules should I add to it? and

[Rails] Re: Missing readline

2009-03-18 Thread Frederick Cheung
On Mar 18, 10:32 pm, Lee wrote: > I have installed Rails 2.2.2 on a Debian Lenny VPS and I am getting > the following error when trying to script/console. > > *** > > Loading development environment (Rails 2.2.2) > /usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such > file to loa

[Rails] Re: Routing to different pages with Ajax login

2009-03-18 Thread Frederick Cheung
On Mar 18, 10:29 pm, Dave L wrote: > Okay, thats what I was going to do in the beginning, but the problem > is how to define the variable for that if else statement.  This is for > a login, so for a certain page I was thinking about inserting a > partial into the login popup form that would con

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread Jeff Schwab
elle wrote: > > > On Mar 19, 9:45 am, Jeff Schwab wrote: >> elle wrote: >> >>> On Mar 19, 9:27 am, Jeff Schwab wrote: elle wrote: > My ~/.profile has: ... > And my ~/.bash_profile has the following: ... > What rules should I add to it? and where do I add them? Y

[Rails] Re: newbie confused by div_for

2009-03-18 Thread Philip Hallstrom
On Mar 18, 2009, at 3:52 PM, Alex Chekholko wrote: > > Hi, > > Absolute Rails beginner here. > > in app/views/players/show.html.rb: > > <%= render :partial => @player.items %> > > in app/views/items/_item.html.erb > > > <% div_for item do %> > > <%= h(item.name) %> > > <% end %> > > > > That

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread elle
On Mar 19, 9:45 am, Jeff Schwab wrote: > elle wrote: > > > On Mar 19, 9:27 am, Jeff Schwab wrote: > >> elle wrote: > >>> My ~/.profile has: > >> ... > > >>> And my ~/.bash_profile has the following: > >> ... > > >>> What rules should I add to it? and where do I add them? > >> You want either a

[Rails] newbie confused by div_for

2009-03-18 Thread Alex Chekholko
Hi, Absolute Rails beginner here. in app/views/players/show.html.rb: <%= render :partial => @player.items %> in app/views/items/_item.html.erb <% div_for item do %> <%= h(item.name) %> <% end %> That works fine. I'm trying to get rid of the partial, so I do something like: in app/view

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread elle
On Mar 19, 9:45 am, Jeff Schwab wrote: > elle wrote: > > > On Mar 19, 9:27 am, Jeff Schwab wrote: > >> elle wrote: > >>> My ~/.profile has: > >> ... > > >>> And my ~/.bash_profile has the following: > >> ... > > >>> What rules should I add to it? and where do I add them? > >> You want either a

[Rails] Re: undefined method `fixtures'

2009-03-18 Thread Jeff Schwab
On Mar 18, 6:05 pm, Frederick Cheung wrote: > On Mar 18, 8:50 pm, Jeff Schwab wrote: > I've just installed restful_authentication, and generated: > > >     script/generate authenticated user session > > > Now, if I try to run unit tests, I get the following error: > > > test/unit/user_test.rb:

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread Jeff Schwab
elle wrote: > > > On Mar 19, 9:27 am, Jeff Schwab wrote: >> elle wrote: >>> My ~/.profile has: >> ... >> >>> And my ~/.bash_profile has the following: >> ... >> >>> What rules should I add to it? and where do I add them? >> You want either a .profile or a .bash_profile, not both. Once bash see

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread elle
On Mar 19, 9:29 am, Jeff Schwab wrote: > elle wrote: > >>> I am on OS 10.5.6 > > And my ~/.bash_profile has the following: > > for a in local $(ls /opt/ | grep -v local | grep -v gentoo); do > > You have an /opt/gentoo directory on Mac OS X?  If you've got emerge > working, I'd love to know how

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread elle
On Mar 19, 9:27 am, Jeff Schwab wrote: > elle wrote: > > My ~/.profile has: > > ... > > > And my ~/.bash_profile has the following: > > ... > > > What rules should I add to it? and where do I add them? > > You want either a .profile or a .bash_profile, not both.  Once bash sees > the .bash_prof

[Rails] Missing readline

2009-03-18 Thread Lee
I have installed Rails 2.2.2 on a Debian Lenny VPS and I am getting the following error when trying to script/console. *** Loading development environment (Rails 2.2.2) /usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError) *** I have seen this

[Rails] Re: Search Results into new table

2009-03-18 Thread Nick Hoyle
> > Thanks for quick response > > How exactly do you do a checkbox with an id? > > <%= form.check_box :stock_id %>? ignore me ive sorted that, was looking at a wrong example -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this mes

[Rails] Re: Routing to different pages with Ajax login

2009-03-18 Thread Dave L
Okay, thats what I was going to do in the beginning, but the problem is how to define the variable for that if else statement. This is for a login, so for a certain page I was thinking about inserting a partial into the login popup form that would contain a hidden field of that id of the user tha

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread Jeff Schwab
elle wrote: >>> I am on OS 10.5.6 > And my ~/.bash_profile has the following: > for a in local $(ls /opt/ | grep -v local | grep -v gentoo); do You have an /opt/gentoo directory on Mac OS X? If you've got emerge working, I'd love to know how. --~--~-~--~~~---~--~

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread Jeff Schwab
elle wrote: > My ~/.profile has: ... > And my ~/.bash_profile has the following: ... > What rules should I add to it? and where do I add them? You want either a .profile or a .bash_profile, not both. Once bash sees the .bash_profile, it won't look for the .profile; that's why you're having

[Rails] Re: Search Results into new table

2009-03-18 Thread Nick Hoyle
Nat wrote: > #Search stock view > <%form_tag(:action=>:search_stock) do%> > <%=submit_tag('Search")%> > <%end%> > > > #Search Stock Controller > def search_stock > @stocks = Stock.find_by_something() > render action=>:result_page > end > > > #Result Page > <%form_tag(:action=>:add_to_my_stoc

[Rails] Re: Who are the ROR guru's on this board ?

2009-03-18 Thread Cwi Tech guy
Frederick Cheung wrote: > On 17 Mar 2009, at 12:24, Phlip wrote: >> >> >> But seriously folks, the great thing about looking like a guru on >> this forum is >> you get to ignore questions you can't answer, and that makes you >> look good. When >> you sign up for a gig reviewing someone's serve

[Rails] Version of SqlSessionStore for Rails 2.3

2009-03-18 Thread Nate Wiger
If you're using SqlSessionStore (originally from Stefan Kaes of railsexpress.de) and upgrade to Rails 2.3, it will break. I have a github version that I have updated for Rails 2.3, and also added a new "native columns" feature to. It is available here: http://github.com/nateware/sql_session_stor

[Rails] Re: ActiveRecord and SOAP

2009-03-18 Thread slava
I understand that ActiveRecord can't do this be default. But I need this to work, so I will have to modify default behaviour. Please suggest an appropriate route. Do I overwrite find method? do I use something else entirely? I need this to work dynamically. thanks On Mar 18, 3:10 pm, Frederick C

[Rails] Re: How to store account information separately and across multiple applications?

2009-03-18 Thread Frederick Cheung
On Mar 18, 10:04 pm, ericindc wrote: > We are currently working on a solution to centralize our userbase. > The central userbase will contain primary account information that > will be extended on an application-specific basis.  For instance, all > users of our applications will have the follow

[Rails] Re: Who are the ROR guru's on this board ?

2009-03-18 Thread Cwi Tech guy
Phlip wrote: > "Wolas!" wrote: > >> my +1 goes to fred (cheung) > > He has a high volume on all the newb questions. > > Worse, I use GMane, so he reliably beats me to them! > > But seriously folks, the great thing about looking like a guru on this > forum is > you get to ignore questions you

[Rails] Re: ActiveRecord and SOAP

2009-03-18 Thread Frederick Cheung
On Mar 18, 8:42 pm, slava wrote: > I need to get some of the data for my models from SOAP based services > and some from a rails db. I am relatively new to Rails and not sure > how to do it right. > > class Product < ActiveRecord::Base   # products should be loaded > through a soap service from

[Rails] Simple auto-complete tutorial

2009-03-18 Thread David Dennis
I'm putting this here because it took too long to set up: == Things you'll need for auto_complete since everyone else was too lazy to write down: Example model is 'list' Example field is 'name' # Controller auto_complete_for :list, :name skip_before_filter :verify_a

[Rails] Re: Search Results into new table

2009-03-18 Thread Nat
#Search stock view <%form_tag(:action=>:search_stock) do%> <%=submit_tag('Search")%> <%end%> #Search Stock Controller def search_stock @stocks = Stock.find_by_something() render action=>:result_page end #Result Page <%form_tag(:action=>:add_to_my_stocks) do %> <%...@stocks.each do |stock|%

[Rails] Re: Routing to different pages with Ajax login

2009-03-18 Thread Frederick Cheung
On Mar 18, 8:51 pm, Dave L wrote: > Yes, that is exactly what I was looking for.  I am having some trouble > calling this custom method within an ajax call though.  I am able to > call page.redirect_to user_path(user) but when I try the following: > >     respond_to do |format| >           form

[Rails] Re: undefined method `fixtures'

2009-03-18 Thread Frederick Cheung
On Mar 18, 8:50 pm, Jeff Schwab wrote: > I've just installed restful_authentication, and generated: > >     script/generate authenticated user session > > Now, if I try to run unit tests, I get the following error: > > test/unit/user_test.rb:7:in `': undefined method > `fixtures' for UserTest:C

[Rails] How to store account information separately and across multiple applications?

2009-03-18 Thread ericindc
We are currently working on a solution to centralize our userbase. The central userbase will contain primary account information that will be extended on an application-specific basis. For instance, all users of our applications will have the following: first_name last_name email phone ...etc...

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread elle
On Mar 19, 9:01 am, Jeff Schwab wrote: > elle wrote: > > Hello, > > > So, I have something happening that I don't understand. I am on OS > > 10.5.6 and followed Dan Benjamin's (Hivelogic) advice on how to > > install Ruby, MySQL As he suggests, I added . ~/.bash_login with > > the path for

[Rails] Problem with paging and MS SQL

2009-03-18 Thread porcbelly
am trying to get the index page going on my table I am using a table on Micrsoft SQL Server, when showing a single row from the table it works OK. but when accessing the index I am gettingthe following error message ActiveRecord::ActiveRecordError: Incorrect syntax near '\.'.: SELECT * FROM (SEL

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread Jeff Schwab
elle wrote: > Hello, > > So, I have something happening that I don't understand. I am on OS > 10.5.6 and followed Dan Benjamin's (Hivelogic) advice on how to > install Ruby, MySQL As he suggests, I added . ~/.bash_login with > the path for the MySQL installation. I also added . ~/.profile wit

[Rails] Re: attachmnet_fu can't keep original file image!

2009-03-18 Thread Ar Chron
Just out of curiousity, add a :resize_to => '5000x5000>', before the thumbnails option. It *should* leave any image smaller than 5000x5000 alone. Obviously, this is an awfully ugly hack, but humor me, and see if the presence of the resize_to option makes a difference. I use ImageMagick and

[Rails] forcing delivery of plain text email when both plain text and html templates are present

2009-03-18 Thread lunaclaire
I have a new user requirement that's causing a problem... I have a user notification for which I build both plaintext and html templates and rails takes care of assembling a multipart/alternative msg that contains both parts. All good. But, now some users with Blackberry's are complaining that t

[Rails] Re: gem list and . ~/.profile

2009-03-18 Thread Greg Donald
On Wed, Mar 18, 2009 at 4:47 PM, elle wrote: > > Hello, > > So, I have something happening that I don't understand. I am on OS > 10.5.6 and followed Dan Benjamin's (Hivelogic) advice on how to > install Ruby, MySQL As he suggests, I added . ~/.bash_login with > the path for the MySQL installa

[Rails] gem list and . ~/.profile

2009-03-18 Thread elle
Hello, So, I have something happening that I don't understand. I am on OS 10.5.6 and followed Dan Benjamin's (Hivelogic) advice on how to install Ruby, MySQL As he suggests, I added . ~/.bash_login with the path for the MySQL installation. I also added . ~/.profile with the path for the Ruby

[Rails] Re: Whats the difference between "<%= abc %>" and "<%= abc -%>"

2009-03-18 Thread Colin Law
2009/3/18 Philip Hallstrom > > > snip.. > > Ah... the -%> is only "end of line". Didn't realize that. > > I just plugged this into 2.2.2: > > <%= "abc" %><%= "def" %> > <%= "ghi" %><%= "klm" %> > > > > <%= "abc" %><%= "def" -%> > <%= "ghi" %><%= "klm" %> > > And got back this: > > abcde

[Rails] Re: Whats the difference between "<%= abc %>" and "<%= abc -%>"

2009-03-18 Thread Greg Donald
On Wed, Mar 18, 2009 at 4:00 PM, Colin Law wrote: > 2009/3/18 Philip Hallstrom >> >> > What difference does the "-" at the end make? >> >> -%> eats the newline. >> >> .<%= abc %><%= xyz %>. will turn into >> >> .abc >> xyz >> . >> >> .<%= abc -%><%= xyz -%>. will turn into >> >> .abcxyz. > > Acc

[Rails] Re: Whats the difference between "<%= abc %>" and "<%= abc -%>"

2009-03-18 Thread Philip Hallstrom
> 2009/3/18 Philip Hallstrom > >> >>> What difference does the "-" at the end make? >> >> -%> eats the newline. >> >> .<%= abc %><%= xyz %>. will turn into >> >> .abc >> xyz >> . >> >> .<%= abc -%><%= xyz -%>. will turn into >> >> .abcxyz. >> > > According to Agile Development with Rails this is

[Rails] Re: DEV Laptop : Ubuntu or Centos , Netbeans or Eclipse ?

2009-03-18 Thread Lee Smith
+1 for Ubuntu. A friend of mine said he had a lot of trouble getting git installed on CentOS 5...I think he even gave up on it. +1 for RubyMine. I migrated from Aptana Studio to RubyMine and I think I'm sold. Aptana is just too bloated for my liking. RubyMine has great code validations and

[Rails] Re: Flex and Rails - NoMethodError

2009-03-18 Thread Jeremy Olliver
It means you have a filter called require_ssl in your application. This kind of filter will usuallly either redirect or stop the current request if it is not made over ssl (e.g https://example.com) find the one in your app to see more. Either make the web request over ssl, or skip the filter if yo

[Rails] 4 Rails apps using the same table. How to streamline?

2009-03-18 Thread LaughingNinja
Hi, I have 4 apps using similar User tables(3 open source projects and one in-house app). I'm trying to merge into one shared database User table (external to all 4 apps). -- I'm using the following code in t

[Rails] Re: rake db:test:purge , nil.object detected

2009-03-18 Thread Pietia
Problem solved , it was problem in my database.yml file On 18 Mar, 21:45, Pietia wrote: > Hii have problem running rake db:test:purge ( my test database is > empty ) : adter running with trace it shouts : > > matthew:rails code pietia$ rake db:test:purge --trace > (in /Users/pietia/Documents/pra

[Rails] Re: Whats the difference between "<%= abc %>" and "<%= abc -%>"

2009-03-18 Thread Colin Law
2009/3/18 Philip Hallstrom > > > What difference does the "-" at the end make? > > -%> eats the newline. > > .<%= abc %><%= xyz %>. will turn into > > .abc > xyz > . > > .<%= abc -%><%= xyz -%>. will turn into > > .abcxyz. > According to Agile Development with Rails this is not quite correct. T

[Rails] Re: Routing to different pages with Ajax login

2009-03-18 Thread Dave L
Yes, that is exactly what I was looking for. I am having some trouble calling this custom method within an ajax call though. I am able to call page.redirect_to user_path(user) but when I try the following: respond_to do |format| format.js do render :update do |page|

[Rails] undefined method `fixtures'

2009-03-18 Thread Jeff Schwab
I've just installed restful_authentication, and generated: script/generate authenticated user session Now, if I try to run unit tests, I get the following error: test/unit/user_test.rb:7:in `': undefined method `fixtures' for UserTest:Class (NoMethodError) Any help would be welcome. --~--~

[Rails] Re: Disabel "pluralize_table_names" in Rails 2.3.2

2009-03-18 Thread Frederick Cheung
On Mar 18, 5:53 pm, Matt Jones wrote: > It hasn't changed in 2.3 - what problem are you experiencing? > Here's my guess: it's being set at the bottom of environment.rb which worked < 2.2 but doesn't work in 2.2 and above in production because app are classes are loaded before that. Fred > --M

[Rails] rake db:test:purge , nil.object detected

2009-03-18 Thread Pietia
Hii have problem running rake db:test:purge ( my test database is empty ) : adter running with trace it shouts : matthew:rails code pietia$ rake db:test:purge --trace (in /Users/pietia/Documents/praca/projekty/silk/rails code) ** Invoke db:test:purge (first_time) ** Invoke environment (first_time

[Rails] attachmnet_fu can't keep original file image!

2009-03-18 Thread Demec
I am currently trying to create an application on RoR and I am using attachmne_fu plugin in order to handle image uploads. I have also install ImageScience to create some thumbnails for the images I upload The problem is that I can upload images, but it resizes the original image to the thumbnail

[Rails] ActiveRecord and SOAP

2009-03-18 Thread slava
I need to get some of the data for my models from SOAP based services and some from a rails db. I am relatively new to Rails and not sure how to do it right. class Product < ActiveRecord::Base # products should be loaded through a soap service from a 3rd party system belongs_to :product_group

[Rails] Re: validates_presence_of

2009-03-18 Thread Shuaib85
Hi Thank you, that worked On Mar 18, 1:20 pm, Andrew Timberlake wrote: > On Tue, Mar 17, 2009 at 11:09 PM, Shuaib85 wrote: > > > Hi all > > > I want to check the presence of either one of two fields for instance, > > phone number or mobile number, if either one presents, allow the > > submissi

[Rails] Re: HABTM and radio_button

2009-03-18 Thread elliottg
Just another question that may help me better understand habtm workings... Would it be true that in order to create a fully functional habtm record that both models using the habtm assoc. need to be updated and saved? Or is it possible to do having a fully working relationship by saving only one

[Rails] Search Results into new table

2009-03-18 Thread Nick Hoyle
I have a search form on my rails site. once the a user has entered a query it displays the results in a table with an extra field button so it can be added to there own portfolio called add to my stocks. How do i get the data for the stock they want to add and put this into a new table called mys

[Rails] Re: Simple Question: How do I install Authlogic w/o git?

2009-03-18 Thread Lee Smith
Why not install it as a gem? gem install authlogic -- 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] Help! RubyGems is broken!

2009-03-18 Thread explainer
I have a problem with RubyGems: ruby gt.rb ruby: no such file to load -- ubygems (LoadError) Here are my compiler and gem versions: ruby --version ruby 1.8.7p5000 (2009-03-03 revision 22728) [x86_64-linux] <> gem --version 1.3.1 <> When I built rubygems, I saw a reference to 'ubygems', b

[Rails] Re: changin var from partial

2009-03-18 Thread Luciano
Fred, this milliseconds idea is just great! I think I can make it work this way. thank your very much! Luciano On Mar 18, 3:43 pm, Frederick Cheung wrote: > On Mar 18, 6:14 pm, Luciano wrote:> Hi Fred, > > > thanks for your advice! > > > Do you believe link_to_remote would be the solution

[Rails] Where to put test/mocks/development?

2009-03-18 Thread Jeff Coleman
According to the Rails 2.1 changeset, creating mock objects for use in test and development environments is 'antiquated'. If that's so, where should you put them? I'm upgrading an app from 2.0.5 to 2.1.0 and we have mocked some objects which make external calls. The mocks for those objects live

[Rails] Re: RESTful routing in 2.3 breaks

2009-03-18 Thread Greg DeVore
I am seeing this as well. Only causes problems with xml and xhr requests. Passing the _method=put on a http request works as expected. See this ticket for how you can verify the problem. I haven't come up with a solution yet. http://rails.lighthouseapp.com/projects/8994/tickets/2289-_methodput-ig

[Rails] Re: Extracting just the text of an ActionMailer receive e-mail

2009-03-18 Thread Philip Hallstrom
> Unfortunately my Googling skills have failed me. I'm looking for > something that will help me quickly parse through the body of a > message received by my ActionMailer based code. Here's the issue: If > someone sends an e-mail to an address that I am reading the body of > the message will often

[Rails] Re: changin var from partial

2009-03-18 Thread Frederick Cheung
On Mar 18, 6:14 pm, Luciano wrote: > Hi Fred, > > thanks for your advice! > > Do you believe link_to_remote would be the solution here? > link_to_remote is a possibility, although you'd have to pass some parameter in to let it know what id it should generate. This sort of thing can get quite me

[Rails] Extracting just the text of an ActionMailer receive e-mail

2009-03-18 Thread David
Unfortunately my Googling skills have failed me. I'm looking for something that will help me quickly parse through the body of a message received by my ActionMailer based code. Here's the issue: If someone sends an e-mail to an address that I am reading the body of the message will often contain t

[Rails] uninitialized constant AuthenticatedSystem

2009-03-18 Thread Jeff Schwab
I've just had a little snafu installing restful_authentication in a new app, and thought I would list it here for archival purposes. Firstly, there are messages about files not existing. My fix was to manually create lib and test/fixtures directories. (Remember, this is a brand new application.

[Rails] Re: Issues with database/object caching and testing

2009-03-18 Thread Frederick Cheung
On Mar 18, 3:48 am, Ricky Barnaby wrote: > Hi all, > > I just burned two hours of development time trying to debug this issue. > Can someone please tell me if there is a way to disable database caching > when running unit tests or another way to avoid running into this type > of problem?? > > T

[Rails] Re: ActionMailer works for gmail/yahoo, but not for other email addresses...HELP!

2009-03-18 Thread tony
help! anyone? On Mar 17, 12:50 pm, tony wrote: > I have a rails app that can send emails to gmail, yahoo accounts.  But > when it comes to more obscure accounts like em...@my-app.com or > em...@blah.edu, the mail never arrives even though the log shows that > the email was sent.  Any ideas why

[Rails] Re: Problem when trying to freeze gem (XP user)

2009-03-18 Thread sultan
I guess I am running 1.3.1. I thought I was running 2.2.2 On Mar 18, 12:16 pm, Matt Jones wrote: > On Mar 17, 10:35 am, sultan wrote: > > > > > I am on XP. This is the first time I am trying to freeze to a gem. > > This is what I get: > > > rake rails:freeze:gems --trace > > (in C:/Documents an

[Rails] Re: why does this happen...

2009-03-18 Thread Matt Jones
RAFB apparently drops files after 24 hours - any chance you could put those examples up someplace (gist or pastie, for instance) with a little more persistence? Without seeing the code, it's hard to even guess what's going on. But I seem to recall seeing similar behavior when I had code saving an

[Rails] Re: Problem when trying to freeze gem (XP user)

2009-03-18 Thread Matt Jones
On Mar 17, 10:35 am, sultan wrote: > I am on XP. This is the first time I am trying to freeze to a gem. > This is what I get: > > rake rails:freeze:gems --trace > (in C:/Documents and Settings/Sultan/My Documents/Aptana Studio/ > upload) > ** Invoke rails:freeze:gems (first_time) > ** Execute r

[Rails] Re: changin var from partial

2009-03-18 Thread Luciano
Hi Fred, thanks for your advice! Do you believe link_to_remote would be the solution here? Luciano On Mar 18, 2:28 pm, Frederick Cheung wrote: > On Mar 18, 5:14 pm, Luciano wrote:> Hello, > > > I have a simple link_to_function to add a group of form fiels, to use > > observe_field I must hav

[Rails] Re: Issues with database/object caching and testing

2009-03-18 Thread Jay Bo
Ricky Barnaby wrote: > Hi all, > > I just burned two hours of development time trying to debug this issue. > Can someone please tell me if there is a way to disable database caching > when running unit tests or another way to avoid running into this type > of problem?? > > This does not work: >

OT Re: [Rails] Web Designer — The International

2009-03-18 Thread Denis Haskin
Have you thought about using something like http://www.crowdspring.com/ or its alternatives? dwh Alexandre R. Labrie wrote: > The International is a not-for-profit newspaper. Our activities focus > on the development and expansion of peace journalism. > > We are helping our readers to develop a

[Rails] Re: Has many association problem

2009-03-18 Thread Matt Jones
You didn't say if it exists, but I'm guessing that there's an 'encounter group' table associated to that number (9). In which case, what you're looking at is a has_many :through relation. (code example simplified - fix up with modules, etc as your app needs) class Patient < ActiveRecord::Bas

[Rails] Re: Rails Query within Query

2009-03-18 Thread Avi Ir
Hi Fred, Thanks for your response -- Your second example is exactly what I needed. The final example, though -- why do you use :joins instead of :include? -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are

[Rails] Re: Disabel "pluralize_table_names" in Rails 2.3.2

2009-03-18 Thread Matt Jones
It hasn't changed in 2.3 - what problem are you experiencing? --Matt Jones On Mar 18, 2:30 am, Fresh Mix wrote: > Fresh Mix wrote: > > What is it in Rails 2.3.2? > > > ActiveRecord::Base.pluralize_table_names = false > > Help? > -- > Posted viahttp://www.ruby-forum.com/. --~--~-~--~---

  1   2   >