[Rails] Re: Re: establish_connection not honored by db:migrate

2010-08-14 Thread Marnen Laibow-Koser
Fearless Fool wrote: > Colin Law wrote: >>> Amen. �But since mine is a table containing >700K 18-column records of >>> unchanging data, I'm not giving up without a fight. >> >> Why is that a reason for having it in a separate db? >> >> Colin > > Um, because I'm lazy? :) Too lazy to set up the

[Rails] Trying to use AJAX to delete a new record

2010-08-14 Thread Bob Smith
I have some AJAX in my app which works fine to add new people to a list shown on-screen. The problem comes if I try to delete one of the new people. Once saved, there is no problem, as there is an id to delete with. The problem comes when I try to remove a new person from the screen. The closest I

[Rails] Re: Receiving nil on ID results using select

2010-08-14 Thread Alpha Blue
Team.all(:conditions => {:espn_team => @team}).each do |row| @o_team = row.id end p @o_team The .find_by query was the cause. Swapping to all and applying a condition for the team works. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to t

Re: [Rails] Rails 3.0.0.rc Hosting

2010-08-14 Thread David Kahn
Not sure if it will work for your needs, but Heroku is supporting Rails 3 beta: http://docs.heroku.com/rails3 On Sat, Aug 14, 2010 at 7:30 PM, Brad Lindsay wrote: > In my experience, most hosting companies who are managing the install > of software won't run pre-release software. They'll wait un

[Rails] Solution for "No definition for XXX" gem installation errors

2010-08-14 Thread turkan
Hello. I had a problem with RDoc when installing various gems (mysql, mongrel). I often got error messages of the kind "No definition for XXX". When doing a google search with that error then it seems that a lot of people do have that problem. I never read a solution (most recommend to simply supp

Re: [Rails] Rails 3.0.0.rc Hosting

2010-08-14 Thread Brad Lindsay
In my experience, most hosting companies who are managing the install of software won't run pre-release software. They'll wait until it's released and supported before supporting it themselves. Brad -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Tal

[Rails] Re: ActiveSupport::TestCase fails to roll back?

2010-08-14 Thread Fearless Fool
Update: Does ROLLBACK undo the creation of new tables? I ask because find_or_create_page_cache(:name) has the effect of creating an AR table named "name" if it doesn't already exist. This appears to confuse the rollback mechanism under certain circumstances in Rails 3.0RC2, but I never had thi

[Rails] Rails 3.0.0.rc Hosting

2010-08-14 Thread Ruby on Rails: Talk
Hi I'm currently with nativespace.co.uk (good rails and general hosting so far - well for me!). I've developed something in Rails 3.0.0.rc and now need to host it ... rather than convert back to Rails 2.3.whatever. NativeSpace just won't do it ... not in my terms and conditions of my hosting agre

[Rails] Re: Link to remote and the equivalent in Rails 3

2010-08-14 Thread Ruby on Rails: Talk
I think it might be "solved" by including :method => :post as below .. <%= link_to "Add Photos", {:controller => 'entries', :action => 'showphotos'}, {:method => :post, :remote => true} %> Then it seems to work ... It also works with: <%= link_to "Add Photos", showphotos_path, :method => :post,

[Rails] Re: Link to remote and the equivalent in Rails 3

2010-08-14 Thread Ruby on Rails: Talk
Thanks for the advice Rob and S sorry to keep harping on about this ... but I've tried: <%= link_to "Add Photos", {:controller => 'entries', :action => 'showphotos'}, {:remote => true} %> and <%= link_to "Add Photos", {:controller => :entries, :action => :showphotos}, {:remote => true} %> a

[Rails] Receiving nil on ID results using select

2010-08-14 Thread Alpha Blue
On my teams table I have a column for ESPN names where ESPN uses it's own naming convention for teams. I'm trying to do a simple find_by_field... @team = "Navy" @o_team = Team.find_by_espn_team(@team, :select => "teams.id AS opponent_id") p @o_team[:opponent_id] p @o_team.opponent_id In the con

[Rails] ActiveSupport::TestCase fails to roll back?

2010-08-14 Thread Fearless Fool
A simple test case that ran properly under 2.3 blows up in 3.0RC2 with the error: Exception raised: <#>. People have reporte this error where there are concurrent processes, but mine is single process. Can someone teach me how to find out if this has been reported as a bug, and if not, what addi

[Rails] Re: Re: Re: Re: Re: using includes in rails models

2010-08-14 Thread Ze Ca
Hi Philip, I put the amatch gem in the environment.rb file as config.gem 'amatch' I tried the require 'amatch' in line 1 in each of my models and got this error: MissingSourceFile in PostsController#show no such file to load -- amatch Thank you! Phillip Ridlen wrote: > I believe you've inclu

[Rails] Re: gem install bundler works, gem bundle doesn't?

2010-08-14 Thread Fearless Fool
Chris Mear wrote: > The command is just "bundle". No need to put "gem" in front of it. > > Chris I just figured that out. There's some erroneous documentation floating around the web. Warn your children. Thanks. - ff -- Posted via http://www.ruby-forum.com/. -- You received this message b

Re: [Rails] Re: Re: Re: Re: using includes in rails models

2010-08-14 Thread Phillip Ridlen
I believe you've included it in the correct place, but where is your `require 'amatch'`? On Sat, Aug 14, 2010 at 4:07 PM, Ze Ca wrote: > Hi Philip, > > Sorry, I was actually asking two different questions in my last reply. > You've answered my question about the console, thanks for your help! >

[Rails] Re: Re: Re: Re: using includes in rails models

2010-08-14 Thread Ze Ca
Hi Philip, Sorry, I was actually asking two different questions in my last reply. You've answered my question about the console, thanks for your help! It's much clearer now. I've put the " include 'amatch' " in both my Post model and my Response model, which have a one to many relationship. Ho

[Rails] i am getting errors when run these commands...........

2010-08-14 Thread Muhammad Ifzaal
XX:~/.coupa-1.5#gem list *** LOCAL GEMS *** actionmailer (2.3.8) actionpack (2.3.8) activerecord (2.3.8) activeresource (2.3.8) activesupport (2.3.8) acts_as_ferret (0.4.1) daemons (1.0.10) gem_plugin (0.2.3) gemsonrails (0.7.2) minitest (1.6.0) mongrel (1.2.0.pre2) mysql (2.8.1) rack (1.1

Re: [Rails] gem install bundler works, gem bundle doesn't?

2010-08-14 Thread Chris Mear
On 14 Aug 2010, at 20:55, Fearless Fool wrote: > This is probably a simple user error, but why doesn't "gem bundle" work > after "gem install bundler"? The command is just "bundle". No need to put "gem" in front of it. Chris -- You received this message because you are subscribed to the Googl

[Rails] Documentation setup errors on Debian 5 during gem installations

2010-08-14 Thread turkan
Hello! I have an Ubuntu 10.04 system (my development system) and a Debian 5 system (my production system). When installing gems on Ubuntu everything works really fine, but on the Debian 5 system the same gems come up with errors during the documentation setup. Why does that happen (below some exam

[Rails] Re: Re: establish_connection not honored by db:migrate

2010-08-14 Thread Fearless Fool
Colin Law wrote: >> Amen. �But since mine is a table containing >700K 18-column records of >> unchanging data, I'm not giving up without a fight. > > Why is that a reason for having it in a separate db? > > Colin Um, because I'm lazy? :) One table in the external database contains 'highly deco

[Rails] Re: Re: establish_connection not honored by db:migrate

2010-08-14 Thread Marnen Laibow-Koser
Colin Law wrote: > On 14 August 2010 21:04, Fearless Fool wrote: >> Colin Law wrote: >>> All this hassle makes one wonder whether it might be possible to >>> combine the two databases into one. �That would make life a lot >>> simpler, if it were possible. >>> Colin >> >> Amen. �But since mine is a

Re: [Rails] Re: establish_connection not honored by db:migrate

2010-08-14 Thread Colin Law
On 14 August 2010 21:04, Fearless Fool wrote: > Colin Law wrote: >> All this hassle makes one wonder whether it might be possible to >> combine the two databases into one.  That would make life a lot >> simpler, if it were possible. >> Colin > > Amen.  But since mine is a table containing >700K 18

[Rails] Re: establish_connection not honored by db:migrate

2010-08-14 Thread Fearless Fool
Colin Law wrote: > All this hassle makes one wonder whether it might be possible to > combine the two databases into one. That would make life a lot > simpler, if it were possible. > Colin Amen. But since mine is a table containing >700K 18-column records of unchanging data, I'm not giving up w

[Rails] Re: Help geting started

2010-08-14 Thread neigaard
Ok I tested some more, and I found out that it works with the webrick (ruby script/server webrick) server, so my mongrel must be broken some how? I did a: sudo gem uninstall fastthread sudo gem uninstall mongrel sudo gem install mongrel But still I get the same error with mongrel. Well I can work

[Rails] gem install bundler works, gem bundle doesn't?

2010-08-14 Thread Fearless Fool
This is probably a simple user error, but why doesn't "gem bundle" work after "gem install bundler"? = bash$ gem install bundler Successfully installed bundler-0.9.26 1 gem installed Installing ri documentation for bundler-0.9.26... Installing RDoc documentation for bundler-0.9.26... bash$ gem

[Rails] Re: Nested resource

2010-08-14 Thread Abder-Rahman Ali
Sijo k g wrote: > >> Does this mean that we made resources :comments nested in resources >> :posts based on the model relationship? > yes > > Please read section 2.7 of > http://edgeguides.rubyonrails.org/routing.html > > > Sijo Thanks Sijo. -- Posted via http://www.ruby-forum.com/. -- You

Re: [Rails] Re: Re: Re: Re: Redirecting after logging in

2010-08-14 Thread Colin Law
On 14 August 2010 19:06, Manu Lorenzo wrote: > Hassan Schroeder wrote: >> On Sat, Aug 14, 2010 at 7:23 AM, Manu Lorenzo >> wrote: >> >>> Hehe, ok, I just wrote >>> @user = >>> User.find_by_screen_name_and_email(@user.screen_name,@user.email) >> >> That seems a little circular -- you're going to a

Re: [Rails] Re: Link to remote and the equivalent in Rails 3

2010-08-14 Thread Rob Biedenharn
On Aug 13, 2010, at 6:37 PM, Ruby on Rails: Talk wrote: Thanks for the speedy reply. I've tried ... <%= link_to "Add Photos", :controller => :entries, :action => :showphotos, :remote => true %> I think you might be missing that there are two (2) hashes: <%= link_to "Add Photos", {

Re: [Rails] Re: Re: Re: using includes in rails models

2010-08-14 Thread Phillip Ridlen
If I'm understanding you correctly, you want to load up script/console (or rails console), instantiate a Seller object, and then access it from the browser? I'm not sure you can do that, because your console is a separate instance of the application (it may access the same database but it's running

[Rails] Re: Re: Re: Re: Redirecting after logging in

2010-08-14 Thread Manu Lorenzo
Hassan Schroeder wrote: > On Sat, Aug 14, 2010 at 7:23 AM, Manu Lorenzo > wrote: > >> Hehe, ok, I just wrote >> @user = >> User.find_by_screen_name_and_email(@user.screen_name,@user.email) > > That seems a little circular -- you're going to assign @user by using > attributes of @user ?? :-) >

[Rails] Re: Nested resource

2010-08-14 Thread Sijo k g
> Does this mean that we made resources :comments nested in resources > :posts based on the model relationship? yes Please read section 2.7 of http://edgeguides.rubyonrails.org/routing.html Sijo -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed

[Rails] Re: Re: Re: using includes in rails models

2010-08-14 Thread Ze Ca
Philip, Thank you for your help, that worked! I put that extra code in the model, but I still get the uninitialized constant error in my browser when accessing the show action. Not sure what may be the issue. Thanks again for your help! Phillip Ridlen wrote: > In your console, you either need

Re: [Rails] Re: Re: Can not get CDATA out of XML node using Nokogiri

2010-08-14 Thread David Kahn
> maybe try .cdatas on the parent node rather than children. Not sure > about Nokogiri but such a method exists for rexml/document. This is beautiful in REXML, just give me what I want, no negotiation -- back to the joy of Rails: REXML::XPath.first(xml_request_doc, "//ATTACHED_DOCUMENT").cdatas

[Rails] Re: compass dosent work for me

2010-08-14 Thread nirosh
yes i did install compass gem -- 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-talk+unsubscr...@googlegroups

Re: [Rails] Re: Re: using includes in rails models

2010-08-14 Thread Phillip Ridlen
In your console, you either need to > include Amatch > m = Sellers.new("hello") or > m = Amatch::Sellers.new("hello") Phillip Ridlen @philtr On Sat, Aug 14, 2010 at 10:32 AM, Ze Ca wrote: > Hi Chris, > > Oh, I don't have a Seller model. The Seller object I was trying to > instantiate was an

[Rails] Re: Paperclip generating crap urls on server, works on dev

2010-08-14 Thread Parker Selbert
Nice, thanks for sharing! -- 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 ru

[Rails] Re: request.raw_post data saving for image getting error

2010-08-14 Thread Yo ss
Chris Mear wrote: > On 14 August 2010 16:12, Yogendra Singh wrote: >> �I am try to saving the request.raw_post in file and try to saving image >> as regular paperclip saving image... i m getting �the error >> 'Errno::EBADF (Bad file descriptor):' >> >> >> �can anybody tell me how sorted out this.

Re: [Rails] request.raw_post data saving for image getting error

2010-08-14 Thread Chris Mear
On 14 August 2010 16:12, Yogendra Singh wrote: >  I am try to saving the request.raw_post in file and try to saving image > as regular paperclip saving image... i m getting  the error > 'Errno::EBADF (Bad file descriptor):' > > >  can anybody tell me how sorted out this. Please show us your contr

[Rails] Re: Paperclip generating crap urls on server, works on dev

2010-08-14 Thread Fernando Perez
Ok so there is definitely a bug, thanks for sharing your experience. I hope it gets fixed quickly. -- 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 rubyonrail

Re: [Rails] Re: compass dosent work for me

2010-08-14 Thread Hassan Schroeder
On Sat, Aug 14, 2010 at 8:34 AM, nirosh wrote: > > *** LOCAL GEMS *** > > compass (0.10.4) > > but getting error when running "compass version" > error msg is "compass: command not found" So it's not in your PATH. You didn't answer this question: > Did you do `gem install compass` or `sudo gem i

[Rails] Re: compass dosent work for me

2010-08-14 Thread nirosh
*** LOCAL GEMS *** compass (0.10.4) but getting error when running "compass version" error msg is "compass: command not found" -- 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...@googl

[Rails] Re: Re: using includes in rails models

2010-08-14 Thread Ze Ca
Hi Chris, Oh, I don't have a Seller model. The Seller object I was trying to instantiate was an amatch class inside of my Response model. Sorry for the confusion. I guess what I'm trying to say is: is there any way to instantiate the amatch Seller class in the console, after you have create a

[Rails] Nested resource

2010-08-14 Thread Abder-Rahman Ali
At: http://edgeguides.rubyonrails.org/getting_started.html Under: 7.3 Adding a Route for Comments For the following: resources :posts do resources :comments end It says: This creates comments as a nested resource within posts. This is another part of capturing the hierarchical relationship tha

[Rails] Re: Re: Re: Re: Rails - references ???

2010-08-14 Thread Abder-Rahman Ali
clanlaw wrote: > On 14 August 2010 15:59, Abder-Rahman Ali wrote: >>> Colin >> >> What do you mean by run it? > > What do you mean, "what do you mean by run it?"? I don't see any > reference to running anything in my post. > > Colin This is when you said: So did you go ahead and "run it"? Wha

Re: [Rails] Re: Re: Rails and Oracle - can select date but cannot save

2010-08-14 Thread Hassan Schroeder
On Sat, Aug 14, 2010 at 8:18 AM, Tomasz Romanowski wrote: > What's the benefit of using Oracle enhanced over > activerecord-jdbc-adapter? Is is any faster/more reliable? Less buggy -- I had problems with the activerecord-jdbc-adapter that were fixed by switching to oracle_enhanced. This was a whi

[Rails] Re: error_messages

2010-08-14 Thread Abder-Rahman Ali
Frederick Cheung wrote: > On Aug 14, 3:58�pm, Abder-Rahman Ali wrote: >> I can google it, but most of the results show error_messages_for. >> > > That's ok - they're basically the same. error_messages is just the > form_for version of error_messages_for. > > Fred Gotcha Fred. Thanks a lot. --

[Rails] Rail3: UJS submit after client-side validation

2010-08-14 Thread AppleII717
I am have some problems with UJS. I have a (potentially) large form that I was doing client side validation on (yes there is also some server side validation) using an old prototype validation routine that is not working with the current version. I actually got validation to work by coping and mo

[Rails] Re: error_messages

2010-08-14 Thread Frederick Cheung
On Aug 14, 3:58 pm, Abder-Rahman Ali wrote: > clanlaw wrote: > > On 14 August 2010 15:09, Abder-Rahman Ali wrote: > > >> Is it displaying an error message? But, what and where is the error > >> message displayed? And, how can we customize it? > > > Have a look athttp://www.google.co.uk/search?&

[Rails] Re: Re: Rails and Oracle - can select date but cannot save

2010-08-14 Thread Tomasz Romanowski
What's the benefit of using Oracle enhanced over activerecord-jdbc-adapter? Is is any faster/more reliable? I think I figured out the problem which imho is a bug in Oracle's activerecord-jdbc-adapter. Through debugging I noticed that Rails converts the date using the Oracle's TIMESTAMP function

[Rails] request.raw_post data saving for image getting error

2010-08-14 Thread Yogendra Singh
Hi, I am try to saving the request.raw_post in file and try to saving image as regular paperclip saving image... i m getting the error 'Errno::EBADF (Bad file descriptor):' can anybody tell me how sorted out this. Thanks in advance -- Posted via http://www.ruby-forum.com/. -- You receiv

Re: [Rails] Re: using includes in rails models

2010-08-14 Thread Chris Mear
On 14 August 2010 16:05, Ze Ca wrote: > Chris Mear wrote: >> On 14 August 2010 07:23, Ze Ca wrote: >>> >>> `const_missing' >>> �from >>> /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in >>> `const_missing' >>> �from (irb):1 >>> >>> I put the gem in my envir

Re: [Rails] Re: Re: Re: Rails - references ???

2010-08-14 Thread clanlaw
On 14 August 2010 15:59, Abder-Rahman Ali wrote: > clanlaw wrote: >> On 14 August 2010 13:48, Abder-Rahman Ali wrote: Colin >>> >>> I found that there is a "post_id" column in the "comments" table. >> >> There you are then, presumably in the example Comment belongs_to Post, >> so this is gen

[Rails] Re: using includes in rails models

2010-08-14 Thread Ze Ca
Chris, Thank you for the reply. putting the include under the model class, which worked! Thanks very much for that. In my script/console, I tried instantiating a new "Sellers" object (Sellers is one of the types of edit distance methods), with this code: >> m = Sellers.new("hello") but stil

[Rails] Re: Re: form_for

2010-08-14 Thread Abder-Rahman Ali
Thanks Colin. -- 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-ta

[Rails] Re: Re: Re: Rails - references ???

2010-08-14 Thread Abder-Rahman Ali
clanlaw wrote: > On 14 August 2010 13:48, Abder-Rahman Ali wrote: >>> Colin >> >> I found that there is a "post_id" column in the "comments" table. > > There you are then, presumably in the example Comment belongs_to Post, > so this is generating the foreign key field for the post. Question > an

[Rails] Re: error_messages

2010-08-14 Thread Abder-Rahman Ali
clanlaw wrote: > On 14 August 2010 15:09, Abder-Rahman Ali wrote: >> >> Is it displaying an error message? But, what and where is the error >> message displayed? And, how can we customize it? >> > > Have a look at http://www.google.co.uk/search?&q=rails+error_messages > > Colin I can google it,

Re: [Rails] Re: form_for

2010-08-14 Thread clanlaw
On 14 August 2010 15:34, Abder-Rahman Ali wrote: > Frederick Cheung wrote: >> On Aug 14, 2:23�pm, Abder-Rahman Ali wrote: >>> form_for: used to generate a form. >>> @post: the object form_for is bound to. >>> >>> The part I didn't get here is: >>> >>> @post.comments.build >>> >>> What does that p

Re: [Rails] error_messages

2010-08-14 Thread clanlaw
On 14 August 2010 15:09, Abder-Rahman Ali wrote: > At: http://edgeguides.rubyonrails.org/getting_started.html > > Under: 7.4 Generating a Controller > > In the following: > > <%= form_for([...@post, @post.comments.build]) do |f| %> > <%= f.error_messages %> > > What is: <%= f.error_messages %> > >

Re: [Rails] Questions on this controller

2010-08-14 Thread Chris Mear
On 14 August 2010 15:32, Abder-Rahman Ali wrote: > At: http://edgeguides.rubyonrails.org/getting_started.html > > Under: 7.4 Generating a Controller > > I have some questions about this controller: > > class CommentsController < ApplicationController > def create > @post = Post.find(params[:post_i

Re: [Rails] Re: Re: Rails - references ???

2010-08-14 Thread clanlaw
On 14 August 2010 13:48, Abder-Rahman Ali wrote: > Colin Law wrote: >> On 14 August 2010 13:26, Abder-Rahman Ali wrote: >>> I saw down few lines in the tutorial the following: >>> >>> The t.references line sets up a foreign key column for the association >>> between the two models. Go ahead and r

Re: [Rails] using includes in rails models

2010-08-14 Thread Chris Mear
On 14 August 2010 07:23, Ze Ca wrote: > Hi, > > I'm trying to use the amatch gem (http://flori.github.com/amatch/) to > help with some validations. In the documentation examples > (http://flori.github.com/amatch/doc/index.html > ), after the require 'amatch', there's an include Amatch. > > Where w

[Rails] Re: form_for

2010-08-14 Thread Abder-Rahman Ali
Frederick Cheung wrote: > On Aug 14, 2:23�pm, Abder-Rahman Ali wrote: >> form_for: used to generate a form. >> @post: the object form_for is bound to. >> >> The part I didn't get here is: >> >> @post.comments.build >> >> What does that part provide me with? > > It's a namespaced resource - it's a

[Rails] Questions on this controller

2010-08-14 Thread Abder-Rahman Ali
At: http://edgeguides.rubyonrails.org/getting_started.html Under: 7.4 Generating a Controller I have some questions about this controller: class CommentsController < ApplicationController def create @post = Post.find(params[:post_id]) @comment = @post.comments.create(params[:comment]) redirect_t

Re: [Rails] Re: Re: Re: Redirecting after logging in

2010-08-14 Thread Hassan Schroeder
On Sat, Aug 14, 2010 at 7:23 AM, Manu Lorenzo wrote: > Hehe, ok, I just wrote > @user = > User.find_by_screen_name_and_email(@user.screen_name,@user.email) That seems a little circular -- you're going to assign @user by using attributes of @user ?? :-) > but now, when I click the login button i

[Rails] Re: Re: Re: Redirecting after logging in

2010-08-14 Thread Manu Lorenzo
Hassan Schroeder wrote: > On Sat, Aug 14, 2010 at 6:56 AM, Manu Lorenzo > wrote: > > It means you haven't set @user to anything (or inadvertently set it to > nil); look at your controller code. > >> def index >> � �...@title = "RailsSpace User Hub" >> end > > Uh, OK. See any "@user" t

[Rails] Re: form_for

2010-08-14 Thread Frederick Cheung
On Aug 14, 2:23 pm, Abder-Rahman Ali wrote: > At the following:http://edgeguides.rubyonrails.org/getting_started.html > > Under: 7.4 Generating a Controller > > It mentions the following: > > <%= form_for([...@post, @post.comments.build]) do |f| %> > > Now, this is what I know: > > form_for: use

[Rails] Re: "uninitialized constant" Error for CalendarHelpper

2010-08-14 Thread Frederick Cheung
On Aug 14, 2:39 pm, Tsuyoshi Takahashi wrote: > Frederick Cheung wrote: > > On Aug 14, 5:37 am, Tsuyoshi Takahashi wrote: > >> indicated then the problem was solved. > > >> Then next same error as below arose evenif I placed "config.gem > >> 'actionpack'" same as the upper statement. > > > Don'

Re: [Rails] Re: Re: Redirecting after logging in

2010-08-14 Thread Hassan Schroeder
On Sat, Aug 14, 2010 at 6:56 AM, Manu Lorenzo wrote: It means you haven't set @user to anything (or inadvertently set it to nil); look at your controller code. > def index >   �...@title = "RailsSpace User Hub" > end Uh, OK. See any "@user" there ? :-) -- Hassan Schroeder

[Rails] error_messages

2010-08-14 Thread Abder-Rahman Ali
At: http://edgeguides.rubyonrails.org/getting_started.html Under: 7.4 Generating a Controller In the following: <%= form_for([...@post, @post.comments.build]) do |f| %> <%= f.error_messages %> What is: <%= f.error_messages %> Is it displaying an error message? But, what and where is the error

[Rails] Re: Re: Redirecting after logging in

2010-08-14 Thread Manu Lorenzo
Hassan Schroeder wrote: > On Sat, Aug 14, 2010 at 6:46 AM, Manu Lorenzo > wrote: > >>> It means you haven't set @user to anything (or inadvertently set it to >>> nil); look at your controller code. > >> Well, this is my code: > >>> NoMethodError in User#index > > Where is the method for `inde

Re: [Rails] compass dosent work for me

2010-08-14 Thread Hassan Schroeder
On Sat, Aug 14, 2010 at 4:09 AM, nirosh wrote: > hi all. i have install compass(followed instructions on compass home > page) but  when i run the compass command my terminal returns the > "compass: command not found" error. > my os is ubuntu, rails version  2.3.5,  ruby 1.8 > > any one has idea???

Re: [Rails] Re: Redirecting after logging in

2010-08-14 Thread Hassan Schroeder
On Sat, Aug 14, 2010 at 6:46 AM, Manu Lorenzo wrote: >> It means you haven't set @user to anything (or inadvertently set it to >> nil); look at your controller code. > Well, this is my code: >> NoMethodError in User#index Where is the method for `index` ? -- Hassan Schroeder

[Rails] Re: Redirecting after logging in

2010-08-14 Thread Manu Lorenzo
Hassan Schroeder wrote: > On Sat, Aug 14, 2010 at 6:19 AM, Manu Lorenzo > wrote: > >> I'm trying to make an example of a small networking site, and when I log >> in a user, it should redirect and show his profile, but I get the >> following error: > >> undefined method `screen_name' for nil:Nil

Re: [Rails] Redirecting after logging in

2010-08-14 Thread Hassan Schroeder
On Sat, Aug 14, 2010 at 6:19 AM, Manu Lorenzo wrote: > I'm trying to make an example of a small networking site, and when I log > in a user, it should redirect and show his profile, but I get the > following error: > undefined method `screen_name' for nil:NilClass > Extracted source (around line

[Rails] Re: "uninitialized constant" Error for CalendarHelpper

2010-08-14 Thread Tsuyoshi Takahashi
Frederick Cheung wrote: > On Aug 14, 5:37�am, Tsuyoshi Takahashi wrote: >> indicated then the problem was solved. >> >> Then next same error as below arose evenif I placed "config.gem >> 'actionpack'" same as the upper statement. > > Don't do that - actionpack is part of rails and so is loaded an

[Rails] form_for

2010-08-14 Thread Abder-Rahman Ali
At the following: http://edgeguides.rubyonrails.org/getting_started.html Under: 7.4 Generating a Controller It mentions the following: <%= form_for([...@post, @post.comments.build]) do |f| %> Now, this is what I know: form_for: used to generate a form. @post: the object form_for is bound to.

[Rails] Redirecting after logging in

2010-08-14 Thread Manu Lorenzo
Hey everybody, I'm trying to make an example of a small networking site, and when I log in a user, it should redirect and show his profile, but I get the following error: NoMethodError in User#index Showing app/views/user/index.html.erb where line #5 raised: undefined method `screen_name' for n

[Rails] Re: Re: Rails - references ???

2010-08-14 Thread Abder-Rahman Ali
Colin Law wrote: > On 14 August 2010 13:26, Abder-Rahman Ali wrote: >> I saw down few lines in the tutorial the following: >> >> The t.references line sets up a foreign key column for the association >> between the two models. Go ahead and run the migration: > > So did you go ahead and run it? W

Re: [Rails] Re: Rails - references ???

2010-08-14 Thread Colin Law
On 14 August 2010 13:26, Abder-Rahman Ali wrote: > I saw down few lines in the tutorial the following: > > The t.references line sets up a foreign key column for the association > between the two models. Go ahead and run the migration: So did you go ahead and run it? What did it generate in the

[Rails] Re: Rails - references ???

2010-08-14 Thread Abder-Rahman Ali
I saw down few lines in the tutorial the following: The t.references line sets up a foreign key column for the association between the two models. Go ahead and run the migration: So, is "references" simply a "Foreign key"? Thanks. -- Posted via http://www.ruby-forum.com/. -- You received thi

[Rails] Rails - references ???

2010-08-14 Thread Abder-Rahman Ali
Following this tutorial: http://edgeguides.rubyonrails.org/getting_started.html Under; 7.1 Generating a Model It mentions the following for creating a "Comment" model: $ rails generate model Comment commenter:string body:text post:references In post:references What is "references"? Is it a dat

[Rails] compass dosent work for me

2010-08-14 Thread nirosh
hi all. i have install compass(followed instructions on compass home page) but when i run the compass command my terminal returns the "compass: command not found" error. my os is ubuntu, rails version 2.3.5, ruby 1.8 any one has idea??? regards, nirosh. -- You received this message because y

Re: [Rails] establish_connection not honored by db:migrate

2010-08-14 Thread Colin Law
On 13 August 2010 00:08, Fearless Fool wrote: > Short form: How can I convince migrate to create or modify tables in a > database other than the "current" one?  In other words, how can I get > migrate to honor establish_connection :external in a model definition? > > Details: I have a large "almos

[Rails] Re: "uninitialized constant" Error for CalendarHelpper

2010-08-14 Thread Frederick Cheung
On Aug 14, 5:37 am, Tsuyoshi Takahashi wrote: > Frederick Cheung wrote: > >Because the indication to require calendar helper is incorrect in cases > >where all the code is loaded ahead of time (the only time this doesn't > >happen is usually development) > > > Use config.gem instead > > Thanks F

[Rails] Re: Paperclip generating crap urls on server, works on dev

2010-08-14 Thread fi...@pivotallabs.com
We encountered this problem too and decided to dig deeper to fix it. You are right about Rails class caching. The Style initializer removes the :format, :geometry and :processors options from the options hash and stores them as an instance variable. When Rails class caching is on, every Style initi

[Rails] Re: Ruby PRAWN PDF generatiog values from controller

2010-08-14 Thread Jeffrey Bonson
headerbar=[] @data.each do |column| data=[] if @headers.include?('dataXX') column.number data << column.number end if @headers.include?('dataXX') column.number data << column.number end headerbar << data end pdf.table headerbar, :

[Rails] Re: Problem with changing from mySql to PostrgreSql with rails

2010-08-14 Thread Mohammed Alenazi
The problem has been solved by adding a counter column to the users table On Aug 13, 7:16 pm, Mohammed Alenazi wrote: > thank you for your responses. Actually what I wanted is to show the > users based on how many properties they have. Something like > @users = User.all(:include => :properties, :

[Rails] searchlogic #order with NULLS LAST

2010-08-14 Thread RaW
Anyone with an idea how to use Searchlogic::RailsHelpers#order method with NULLS LAST? -- 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,

Re: [Rails] Multisite in Rails 3

2010-08-14 Thread Ramon Tayag
It shouldn't be that much different from what you can find at http://railscasts.com/episodes/123-subdomains Also look at http://stackoverflow.com/questions/2308903/support-for-multiple-domains-subdomains-in-rails

[Rails] Re: Re: :limit text mysql

2010-08-14 Thread Conor Nugent
Marnen Laibow-Koser wrote: > Philip Hallstrom wrote: Thanks a million for your reply. I will give that a go. I had seen that that is possible but I was a bit worried that it would mean that my migrations wouldn't be database agnostic >>> >>> Is there a reason that you're no

[Rails] Multisite in Rails 3

2010-08-14 Thread ratnik
I need to develop Rails 3 application with a single codebase (controlers, models, helpers, etc), but with different views support. For example if I open www.site1.com my Rails 3 app loads views and layouts for site1, if I open www.site2.com it loads views and layouts for site2. So both sites have t

[Rails] Can't Dump file - paperclip with workling and starling

2010-08-14 Thread Sean Six
here is my controller action: def create UploadWorker.async_send_file(params[:image]) flash[:notice] = "uploading file" redirect_to root_url end class UploadWorker < Workling::Base def send_file(options) @image = current_user.images.build(params[:image]) @image.save end end

[Rails] Re: sqlite3.dll problem

2010-08-14 Thread Armoilla Armoilla
Will Kriski wrote: > this link doesn't work > > Carlos Aguayo wrote: >> http://wiki.rubyonrails.org/rails/pages/HowtoUseSQLite >> >> On Apr 12, 8:10 pm, Phillip Gawlowski Hi,In my case I use Ruby 1.9.1 OS is WindowsXP SP3 Solution 1.Go to http://www.sqlite.org/download.html and Download file

[Rails] Re: Link to remote and the equivalent in Rails 3

2010-08-14 Thread Ruby on Rails: Talk
Thanks for the advice. But I've watched it probably 5 times ... even in slow motion! And it doesn't answer the problem. The Entries Controller just shows Blog Entries. I click on a link which says 'Add Photos' and all I want it to do is execute some controller code and then update a div. The Pho