[Rails] I have problem ....PostgreSQLAdapter::PGconn

2010-06-29 Thread Vuong Hung
I have a problem when i am creating a rails project using postgresql... uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn I have already installed gem postgres-pr. but not start.. I using rails version 2.3.5 Ruby 1.8.7 PostgresSQL 1.10.2. Please help me thanks. --

Re: [Rails] FTP: which FTP is best for Ubuntu to upload rails project

2010-06-29 Thread Colin Law
On 29 June 2010 22:23, Ali Imran wrote: > I am trying to upload the constants to my shared server but built in > FTP in Ubuntu is not working You might be better posting this in a Ubuntu support list such as https://lists.ubuntu.com/mailman/listinfo/ubuntu-users as it does not appear to be a RoR

[Rails] Re: Referencing a Layout

2010-06-29 Thread Marnen Laibow-Koser
Marnen Laibow-Koser wrote: [...] > ...except that the whole thing is completely infeasible.  How would the > layout be provided?  It won't fit in a GET query string, and you can't > supply POST data in a link, so the only way to supply it would be as an > uploaded file.  And at that point, you c

[Rails] Re: Referencing a Layout

2010-06-29 Thread Marnen Laibow-Koser
Doug Jolley wrote: >> Your site shouldn't be doing your >> consumers' layout work. >  > I don't think that it is. Do you have a reason for this opinion, or are you just handwaving? >  What I'm trying to do is to come up with a > mechanism that will allow the consumers to do their own layout work.

[Rails] Re: Re: OAI-PMH problem with more than one parameter.

2010-06-29 Thread Max Max
Szymon Maka wrote: > Walter McGinnis wrote: >> Yeah, wish I could be of more help, but I don't use the ActiveRecord >> wrapper with the OAI gem. I use another one that ties directly into >> my search engine. > > It is very strange to me. Seem that the problem is with parsing the > date. > > NoM

[Rails] activesupport classify truncates

2010-06-29 Thread Don French
Sorry about cross posting, but this is where it really belongs. I tried to use "my_class".classify and got MyClas as a result. Tried others that ended in 'ss' and got the same results. Tried other endings and they work. Ruby 1.9.2-preview3 and activesupport-3.0.0.beta4 is being used. Is this corr

[Rails] Re: Referencing a Layout

2010-06-29 Thread doug
> Your site shouldn't be doing your > consumers' layout work. I don't think that it is. What I'm trying to do is to come up with a mechanism that will allow the consumers to do their own layout work. >  Instead, it sshould provide data that your > consumers can lay out as they please. That is c

[Rails] Re: Referencing a Layout

2010-06-29 Thread doug
> Why not make your third party partners create a special HTML page and include > an HTML comment that indicates where the content goes.  Something like... > > >  . >   >    My Groovy Layout >     >    Footer Stuff >   > So, it looks like what you're proposing is more-less a re-invention of

Re: [Rails] One time shot feed params from development

2010-06-29 Thread Bill Walton
Oops ;-) On Tue, Jun 29, 2010 at 9:08 PM, Bill Walton wrote: > Hi Craig, > > On Tue, Jun 29, 2010 at 8:25 PM, Craig White wrote: >> I got a confirmation on my development system that should have gone to >> the production system and so I have a 'Post' set of data which I know >> from my developme

Re: [Rails] One time shot feed params from development

2010-06-29 Thread Bill Walton
Hi Craig, On Tue, Jun 29, 2010 at 8:25 PM, Craig White wrote: > I got a confirmation on my development system that should have gone to > the production system and so I have a 'Post' set of data which I know > from my development logs that I want to feed to my production system. > > Is there some

Re: [Rails] Re: Redirecting old URLs to new permalinked URLs

2010-06-29 Thread Hassan Schroeder
On Tue, Jun 29, 2010 at 1:37 PM, Joe wrote: > I've tried, but I can't figure out how to replace $1 with a permalink > variable thats in ruby on rails. Im pretty sure regex cannot help me > with this, I need to take the permalink value, and use that in the > redirect. > > PLEASE JUST TELL ME AND IL

[Rails] One time shot feed params from development

2010-06-29 Thread Craig White
I got a confirmation on my development system that should have gone to the production system and so I have a 'Post' set of data which I know from my development logs that I want to feed to my production system. Is there some easy way to do this in the console or do I have to try to recreate it wit

[Rails] Re: rake db:create failing

2010-06-29 Thread Agoofin
I've had an issue with the sqlite driver. What version are you using? Looking at the RubyForge site, they've released version 1.3.0 of sqlite3-ruby on June 6th - upgrading this might help On Jun 28, 3:49 pm, Joe wrote: > Hi everyone, > > First of all, I'm running Mac OS X Snow Leopard. > > Trying

[Rails] Re: How do you deploy RoR? Newb alert!

2010-06-29 Thread Marnen Laibow-Koser
Jeremy wrote: > Hi Marnen, >  >     > It probably has. �I don't think Passenger was in wide use at the > time, >     > and it's now probably the most common choice for deployment. >  > So you're saying Passenger is a good choice for deployment then? Definitely.  >  I > still plan to read the afor

[Rails] Re: How do you deploy RoR? Newb alert!

2010-06-29 Thread Jeremy
Hi Marnen, > It probably has.  I don't think Passenger was in wide use at the time, > and it's now probably the most common choice for deployment. So you're saying Passenger is a good choice for deployment then? I still plan to read the aforementioned book, I don't think it would hurt.

[Rails] Re: Send_data

2010-06-29 Thread Marnen Laibow-Koser
Mamadou Touré wrote: [...] >> >> >> >> > Thanks Marnen, > > Unfortunately I have to hav each file on its own, I must not merge them > in on single file. Is there a way to simulate several requests in order > to loop through the array ? Even if there were, the browser would not be able to un

[Rails] Re: Send_data

2010-06-29 Thread Marnen Laibow-Koser
Mamadou Touré wrote: [...] >> >> >> >> > Thanks Marnen, > > Unfortunately I have to hav each file on its own, I must not merge them > in on single file. Is there a way to simulate several requests in order > to loop through the array ? Even if there were, the browser would not be able to un

[Rails] Re: How do you deploy RoR? Newb alert!

2010-06-29 Thread Marnen Laibow-Koser
Jeremy wrote: > Hi everyone, > I have to say that I am very pleased that I have received such great > responses!  I kept expecting that I would get the cold shoulder but > instead I got real answers. I feel I have a solid direction and don't > feel like I'm blindly trying to figure this stuff out.

[Rails] Re: Send_data

2010-06-29 Thread Mamadou Touré
Marnen Laibow-Koser wrote: > Mamadou Touré wrote: > [...] >> >> I'm having the file displayed now, but the other issue that I'm facing >> now is : I have several files to open, I put them in an array that I >> loop through, but only the last file is opened: >> >> What's wrong ? >> >> arr.each

Re: [Rails] Re: link_to underlying urls/paths are showing in the actual view

2010-06-29 Thread Anand Ramanathan
Could you try wrapping the controller, action, etc. in a url hash <%= link_to "Here", :url => {:controller => 'home', :action => 'inside_here' }%> On Tue, Jun 29, 2010 at 1:45 PM, Colin Law wrote: > On 29 June 2010 21:39, Matt Royer wrote: > > Has anyone found a solution to this or is an

[Rails] Re: How do you deploy RoR? Newb alert!

2010-06-29 Thread Jeremy
Hi everyone, I have to say that I am very pleased that I have received such great responses! I kept expecting that I would get the cold shoulder but instead I got real answers. I feel I have a solid direction and don't feel like I'm blindly trying to figure this stuff out. So please accept my sinc

[Rails] Re: Re: Referencing a Layout

2010-06-29 Thread Marnen Laibow-Koser
Hassan Schroeder wrote: > On Tue, Jun 29, 2010 at 2:50 PM, Marnen Laibow-Koser > wrote: >> >>> I mentioned this in another post and from the limited responses that I >>> received I concluded that almost no one else has any interest in doing >>> this sort of thing. �I find that a bit surprising ...

[Rails] mongrel_cluster --prefix and static content

2010-06-29 Thread sjm
Hi Everyone I have been searching for an answer for this all day, stumbling from page to page trying examples that don't work! Anyway, I am trying to run multiple Rails apps sitting behind Apache2.2. It is nearly there, apart from the static content (images, etc) is not delivered anymore (since

[Rails] Re: Mongrel is Terminating Automatically

2010-06-29 Thread laz
I face the same problem with my webrick server. I am new to ROR, so any thought on why this occurs would be very helpful. -Laz On Jun 11, 3:34 am, sumanta wrote: > Dear All, > > I am facing a problem - when I am hittinghttp://localhost:3000/login_c > to enter to our system, webrick/mongrel quiti

Re: [Rails] Re: Referencing a Layout

2010-06-29 Thread Hassan Schroeder
On Tue, Jun 29, 2010 at 2:50 PM, Marnen Laibow-Koser wrote: > >> I mentioned this in another post and from the limited responses that I >> received I concluded that almost no one else has any interest in doing >> this sort of thing.  I find that a bit surprising ... > Yiure going about this backw

[Rails] Re: Passenger: configuration problem

2010-06-29 Thread Marnen Laibow-Koser
Ali Imran wrote: > I follow the steps to install passenger , > > I installed it in the same way, > > I copy the contents on the same location it asked to do, > > when i run > passenger-install-nginx-module > > I copy paste the contants in apache.conf Why are you using the Nginx Passenger modul

Re: [Rails] Passenger: configuration problem

2010-06-29 Thread Norm Scherer
Ali Imran wrote: I follow the steps to install passenger , I installed it in the same way, I copy the contents on the same location it asked to do, when i run passenger-install-nginx-module I copy paste the contants in apache.conf which includes Loadmodule PassengerRoot PassengerRuby

[Rails] Re: Referencing a Layout

2010-06-29 Thread Marnen Laibow-Koser
Doug Jolley wrote: >>�But why would you ever do that? �Layouts are designed to >> hold the parts of your view that don't change. �If they don't change, >> you shouldn't need to generate them on the fly. > > What I'd really like to be able to do is to allow for an external > layout. That is, when

Re: [Rails] Re: Referencing a Layout

2010-06-29 Thread Philip Hallstrom
>> But why would you ever do that? Layouts are designed to >> hold the parts of your view that don't change. If they don't change, >> you shouldn't need to generate them on the fly. > > What I'd really like to be able to do is to allow for an external > layout. That is, when another site links

[Rails] Re: Referencing a Layout

2010-06-29 Thread doug
> But why would you ever do that?  Layouts are designed to > hold the parts of your view that don't change.  If they don't change, > you shouldn't need to generate them on the fly. What I'd really like to be able to do is to allow for an external layout. That is, when another site links to the re

[Rails] FTP: which FTP is best for Ubuntu to upload rails project

2010-06-29 Thread Ali Imran
I am trying to upload the constants to my shared server but built in FTP in Ubuntu is not working -- 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

[Rails] Passenger: configuration problem

2010-06-29 Thread Ali Imran
I follow the steps to install passenger , I installed it in the same way, I copy the contents on the same location it asked to do, when i run passenger-install-nginx-module I copy paste the contants in apache.conf which includes Loadmodule PassengerRoot PassengerRuby I am having a problem h

Re: [Rails] Re: link_to underlying urls/paths are showing in the actual view

2010-06-29 Thread Colin Law
On 29 June 2010 21:39, Matt Royer wrote: > Has anyone found a solution to this or is anyone else having this issue? > > It's odd to me that Adler and I would be the only ones. Especially since > I am only using the defaults that Rails 3.0.0.beta4 provides. > > I didn't change the default JavaScrip

[Rails] Re: link_to underlying urls/paths are showing in the actual view

2010-06-29 Thread Matt Royer
Has anyone found a solution to this or is anyone else having this issue? It's odd to me that Adler and I would be the only ones. Especially since I am only using the defaults that Rails 3.0.0.beta4 provides. I didn't change the default JavaScript files. I have added them using :defaults. I don'

[Rails] Re: Redirecting old URLs to new permalinked URLs

2010-06-29 Thread Joe
I've tried, but I can't figure out how to replace $1 with a permalink variable thats in ruby on rails. Im pretty sure regex cannot help me with this, I need to take the permalink value, and use that in the redirect. PLEASE JUST TELL ME AND ILL LEARN, I DONT JUST TAKE THE ANSWER AND BE DONE WITH IT

[Rails] Re: Send_data

2010-06-29 Thread Marnen Laibow-Koser
Mamadou Touré wrote: [...] > > I'm having the file displayed now, but the other issue that I'm facing > now is : I have several files to open, I put them in an array that I > loop through, but only the last file is opened: > > What's wrong ? > > arr.each do |form| > file_name = form + "-

[Rails] Re: Referencing a Layout

2010-06-29 Thread Marnen Laibow-Koser
Doug Jolley wrote: > My understanding is that Rails generally expects layouts to be files > and any reference to a layout is a path to the appropriate file. > Thus, a layout that is generated at run time and stored only in memory > (as a variable), can only be loaded by first writing the layout to

[Rails] Re: Send_data

2010-06-29 Thread Mamadou Touré
Michael Pavling wrote: > On 28 June 2010 21:45, dieinzige wrote: >> what the hell are u doing, if u have file, u can simplify get link to user, > > What if the OP needs users to be logged in to view files? Or complete > some other approval process. Not much sense having them accessible > from the

[Rails] Referencing a Layout

2010-06-29 Thread doug
My understanding is that Rails generally expects layouts to be files and any reference to a layout is a path to the appropriate file. Thus, a layout that is generated at run time and stored only in memory (as a variable), can only be loaded by first writing the layout to a temporary disk file and t

[Rails] Re: belongs_to. Association methods don't pass data to DB

2010-06-29 Thread P.A.
I was most interested about that methods which are added by belongs_to declaration not has_many. Anyway, thanks for help, Colin. On 29 июн, 20:47, Colin Law wrote: > On 29 June 2010 17:29, P.A. wrote: > > > > > I got it. > > > It should to break the creation statements onto a few steps: > > > W

[Rails] Rails 3 and ActiveSupport::Callbacks

2010-06-29 Thread Jean-denis Vauguet
Hi. Is there a way to access an object within callbacks defined with set_callback (ActiveSupport 3.0.0-beta4, matching Rails 3)? Use case is as follow: require 'active_support' class Foo include ActiveSupport::Callbacks define_callbacks :handle_response set_callback

Re: [Rails] Re: Add a "filter" on the ERB <%= ... %>

2010-06-29 Thread Michael Pavling
On 29 June 2010 15:24, daphonz wrote: > There is a much easier solution to all of this.  Utilize the try() > method that comes with ActiveSupport: I don't see how that's easier than the guard condition that Colin suggested - but either way it ignores that the OP wanted to deal with all the occurr

[Rails] Re: Is there any way to have observe_field react to the current value of a field also?

2010-06-29 Thread Bob Smith
Never mind. I just tried it and it works perfectly. Thanks for the help. Bob Bob Smith wrote: > How would this work with the observe_field later in the page ? This is > an edit page, so if the field is changed, the page needs to react > correctly This works fine for a new user, but will it be O

Re: [Rails] Re: Redirecting old URLs to new permalinked URLs

2010-06-29 Thread Hassan Schroeder
On Tue, Jun 29, 2010 at 10:11 AM, wrote: > I've already read this, and still don't understand. As I said, it's using regular expressions, and *you* need to figure out how they work. Find a regex tutorial, open up irb and play around. Then, or even before, use the examples in the Rack::Rewrite d

[Rails] Re: How do you deploy RoR? Newb alert!

2010-06-29 Thread Sur
Hi, SVN and/or GIT has nothing to do directly with deployment or passenger but you should study on Source Code Management or Source Code Version SVN and GIT both are a source code management tools and you can manage the updates of your source code with them. SVN though is older yet solid, GIT is

Re: [Rails] Re: Is there any way to have observe_field react to the current value of a field also?

2010-06-29 Thread Bill Walton
Hi Bob, On Tue, Jun 29, 2010 at 12:28 PM, Bob Smith wrote: > How would this work with the observe_field later in the page ? This is > an edit page, so if the field is changed, the page needs to react > correctly This works fine for a new user, but will it be OK for changing > an existing user ?

[Rails] Re: can I access session variable in model

2010-06-29 Thread Anand Ramanathan
Hi, I have a scenario where the session variable is handy in the model - I need to be able to get the current value, as it may be changed at any time. I have a delayed_job that runs a long running model activity (calling multiple web services, populating the database, etc.) in the background.

[Rails] Re: deploy: First Rails App to shared server

2010-06-29 Thread Lake Denman
Well, it looks like you're using rails 2.2.3 in your config/ environment.rb file. You can either update that version number in the environment.rb file to match 2.3.8, the rails version you say you have installed on your host, and deploy. Or "gem install -v=2.2.3 rails" on your server and hope for

[Rails] Re: Is there any way to have observe_field react to the current value of a field also?

2010-06-29 Thread Bob Smith
How would this work with the observe_field later in the page ? This is an edit page, so if the field is changed, the page needs to react correctly This works fine for a new user, but will it be OK for changing an existing user ? Thanks for the reply Bob > > <% if @household.zip != x an

[Rails] Re: PDFKIT Gem Example

2010-06-29 Thread geolev
Ryan Bates did a Railscast on this yesterday. http://railscasts.com/episodes/220-pdfkit On Jun 18, 4:23 pm, Rails Learner wrote: > Hi Everybody, > > Can anyone give me a small working example of how to use PDFKIT to > convert a view in rails app to pdf file? > > Any help is much appreciated! > >

Re: [Rails] Re: Redirecting old URLs to new permalinked URLs

2010-06-29 Thread youtube
I've already read this, and still don't understand. Would I need something like this? rewrite %r{/tutorials/(\w+)categories/(\w+)}, '/categories/ CategoryPermalinkHere/tutorials/TutorialPermalinkHere' rewrite %r{/tutorials/(\w+)}, '/categories/CategoryPermalinkHere/ tutorials/TutorialPermalinkH

[Rails] Rails session_id is not unique

2010-06-29 Thread AD
We have been experiencing an issue in our environment (Jruby 1.4, Rails 2.3.5, Tomcat 5.5, Java 1.6) where duplicate session_ids are being created in the sessions table. We are assuming the only way this can happen is when 2 sessions are created at the exact same time on 2 different machines (we h

Re: [Rails] Re: belongs_to. Association methods don't pass data to DB

2010-06-29 Thread Colin Law
On 29 June 2010 17:29, P.A. wrote: > I got it. > > It should to break the creation statements onto a few steps: > > WHEN: > >>> one = Article.new(:title => 'one') > >>> one.author = Author.new(:name => 'Pavel') > >>> one.save > >>> two = Article.new(:title => 'two') > >>> two.author = Author.find(

[Rails] Re: belongs_to. Association methods don't pass data to DB

2010-06-29 Thread P.A.
I got it. It should to break the creation statements onto a few steps: WHEN: >> one = Article.new(:title => 'one') >> one.author = Author.new(:name => 'Pavel') >> one.save >> two = Article.new(:title => 'two') >> two.author = Author.find(:first, :conditions => {:name => 'Pavel'}) >> two.sav

[Rails] Re: How to populate a table with id of selected item from another table

2010-06-29 Thread RichardOnRails
Hassan, Please hold off on looking at my last, unreasonably large post. I'm embarrassed to have posted such a monstrosity. I found a bunch of tutorials on collection_select, so I should be able to discover where I've gone astray in trying to apply that method in my app. I'll post back how I so

[Rails] Re: Search plugin/gem recommendation for search with joins

2010-06-29 Thread Marnen Laibow-Koser
Max Williams wrote: > Hi all. It's time to choose a search system for a new app i've been > working on and though i'd crowdsource some wisdom. I've used > ferret/acts_as_ferret before and encountered some problems which make me > reluctant to use it again. I know people are using sphinx/solr the

[Rails] Re: jquery ajax.submit() help

2010-06-29 Thread Piyush Choudhary
Some urgent help required.. Any one.. On Mon, Jun 28, 2010 at 8:24 PM, Piyush Choudhary < piyush.choudhary...@gmail.com> wrote: > Hi all, > > I need some quick help in jquery. > While using jquery ajax.Submit(), we can specify the target div to be > modified with the template rendered by the corr

[Rails] Search plugin/gem recommendation for search with joins

2010-06-29 Thread Max Williams
Hi all. It's time to choose a search system for a new app i've been working on and though i'd crowdsource some wisdom. I've used ferret/acts_as_ferret before and encountered some problems which make me reluctant to use it again. I know people are using sphinx/solr these days (and other things i'

[Rails] Re: PKI authentication? Webrat, Selenium, restful-auth... ?

2010-06-29 Thread Marnen Laibow-Koser
Aldric Giacomoni wrote: > Hi, > We are trying to fix a test suite to check an app which uses PKI > authentication. > Is there something out there which could make our lives easier? Webrat > and Selenium don't seem to support this right now. AFAIK, Selenium supports anything that the browser suppo

[Rails] Re: Spreadsheet creation

2010-06-29 Thread Spec Ex
Spec Ex wrote: > Hey guys, > > I'm trying to create a spreadsheet with Ruby using the spreadsheet gem. > I'm able to create a new sheet and add data and everything but I'm > wondering, is there any way to preserve macros and vb projects in an > existing xls file then add data to it in a new sheet?

[Rails] PKI authentication? Webrat, Selenium, restful-auth... ?

2010-06-29 Thread Aldric Giacomoni
Hi, We are trying to fix a test suite to check an app which uses PKI authentication. Is there something out there which could make our lives easier? Webrat and Selenium don't seem to support this right now. Thanks. -- Posted via http://www.ruby-forum.com/. -- You received this message because y

[Rails] belongs_to. Association methods don't pass data to DB

2010-06-29 Thread P.A.
Hi. I have a problem with the association methods which passed to a model through a belongs_to declaration. Here's an illustration of the issue: GIVEN: # migration class CreateArticlesAndAuthorsTables < ActiveRecord::Migration   def self.up create_table :articles do |t|   t.text :tit

[Rails] Re: Possible to recover data from log/development.log files?

2010-06-29 Thread Ar Chron
If you haven't cleared out your log along the way, you should be able to parse through that and reconstruct your inserts. I know I periodically 'archive off' my development.log (development.log.thru.20100617 anyone?) just so I have a record (especially when trying to diagnose issues). -- Post

[Rails] Re: Add a "filter" on the ERB <%= ... %>

2010-06-29 Thread daphonz
There is a much easier solution to all of this. Utilize the try() method that comes with ActiveSupport: <%= @post.try(:user).try(:name) %> try() calls a method and catches exceptions, returning nil instead. Try is added to the main Object class, so even nil objects have the method, hence your

[Rails] Possible to recover data from log/development.log files?

2010-06-29 Thread Andrew Vliet
Hey all. Seems I've found a bug in Rails db:migrate - maybe it is, maybe it isn't. If possible - I'd appreciate some help recovering from it. Apps, OS, etc.: MySQL:Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (x86_64) using readline 5.1 Rails:2.3.8, OS:CentOS 5.4 updated as of th

[Rails] singleton can't be dumped in rails session

2010-06-29 Thread Tushar Gandhi
Hi, I am doing an integration with commission junction using SOAP to get the result. It is working fine for me. My problem is I have to add the pagination so I have used will_paginate for pagination. For each page I am doing a call to commission junction and getting the result which make a performa

Re: [Rails] Is there any way to have observe_field react to the current value of a field also?

2010-06-29 Thread Bill Walton
HI Bob, On Mon, Jun 28, 2010 at 3:16 PM, Bob Smith wrote: > The problem is > that this is the page is to edit an existing record also, so > observe_field needs to see that the zip code currently doesn't match, > so the church list needs to be shown. Currently, even if the zip > doesn't match, the

Re: [Rails] rake db:create failing

2010-06-29 Thread Colin Law
On 28 June 2010 20:49, Joe wrote: > Hi everyone, > > First of all, I'm running Mac OS X Snow Leopard. > > Trying to set up a new SQLite database, but when I run rake db:create, > I get the following huge message: > > > unable to open database file >... > Couldn't create database for {"timeout"=>50

[Rails] Re: problem finding find current page

2010-06-29 Thread Neil Bye
Andy Jeffries wrote: > On 29 June 2010 11:00, Neil Bye wrote: > >> I have this bit of code in my email.controller >> >> user = @current_user >> story = @current_story >> recipient = story.user >> >> It doesn't work because @current_story isn't defined. How can I find the >> current page to make t

[Rails] Re: How to submit a drop down menu using forms

2010-06-29 Thread Bohdan Pohoriletz
atin wrote: > Hi > I am learning rails & I am developing a blog site using it so i want > to make a drop down menu which would have the title of the blog & on > selecting you need javascript to handle event onselect that title i should be redirected to the show page of blog > contents > I have 2

Re: [Rails] rake db:create failing

2010-06-29 Thread Peter Hickman
I know this will sound a little silly but do you have a db directory just below the application root? Rails should have created it. Do you have permission to access that directory? Do you have permission to create files in that directory? Maybe the application directory was created by a different

Re: [Rails] problem finding find current page

2010-06-29 Thread Andy Jeffries
On 29 June 2010 11:00, Neil Bye wrote: > I have this bit of code in my email.controller > > user = @current_user > story = @current_story > recipient = story.user > > It doesn't work because @current_story isn't defined. How can I find the > current page to make this work? You haven't given any

[Rails] problem finding find current page

2010-06-29 Thread Neil Bye
I have this bit of code in my email.controller user = @current_user story = @current_story recipient = story.user It doesn't work because @current_story isn't defined. How can I find the current page to make this work? -- Posted via http://www.ruby-forum.com/. -- You received this message beca

[Rails] 3 Month (initially) Contract Ruby Developer role - Full time office based - London - Market Rates

2010-06-29 Thread Richard Marshall
Hi All Looking for a solid Ruby developer who is looking for contract work in London. working for a fantastic online client. Please contact me for this great position. • Ruby on Rails 2.3+ web application development • Familiar with HTML/CSS • Object Orientated programming skills •

Re: [Rails] Re: Re: Add a "filter" on the ERB <%= ... %>

2010-06-29 Thread Michael Pavling
On 29 June 2010 10:37, Carsten Gehling wrote: > Yup it is a very neat solution, that I will adapt to. Thanks No worries. I got it from the "Refactoring: Ruby Edition" book - they call it the "introduce null object" pattern. Well worth being familiar with the book for loads of other very good litt

[Rails] How to submit a drop down menu using forms

2010-06-29 Thread atin
Hi I am learning rails & I am developing a blog site using it so i want to make a drop down menu which would have the title of the blog & on selecting that title i should be redirected to the show page of blog contents I have 2 models Blog: title has_many articles Artcile: name author date body be

[Rails] rake db:create failing

2010-06-29 Thread Joe
Hi everyone, First of all, I'm running Mac OS X Snow Leopard. Trying to set up a new SQLite database, but when I run rake db:create, I get the following huge message: unable to open database file /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ gems/1.8/gems/activerecord-2.3

[Rails] Jobs - VP Engineering role and ROR developers NEEDED

2010-06-29 Thread Kelly Faber
San Francisco Bay Area, CA – VP Engineering Position. Rapidly growing social media company whose award-winning technology, is used by thousands of companies including top brands like Pepsi, Facebook, AT&T, Unilever, CNN, & Ogilvy. Headquartered in Palo Alto, California, they are a privately-held

[Rails] Re: Re: Add a "filter" on the ERB <%= ... %>

2010-06-29 Thread Carsten Gehling
Michael Pavling wrote: > > Overloading method_missing is probable to cause more problems than it > fixes :-) I know - it is a very VERY temporary solution to get peace to do real fixing. :-) > You only need to fix the missing associations one at a time; get a > MissingUser in there and all the

[Rails] Re: Editing multiples rows in a single table

2010-06-29 Thread pepe
Check out some of the railscasts episodes (http://railscasts.com). Search for 'multiple' and you might find something of interest to you. On Jun 28, 2:23 pm, richardsugg wrote: > I have a table that contains user options, so the table looks like > id > username > option_name > option_value > > Ho

Re: [Rails] Re: Add a "filter" on the ERB <%= ... %>

2010-06-29 Thread Michael Pavling
On 29 June 2010 10:24, Carsten Gehling wrote: > class NilClass >  def method_missing(method_name, *args) >    '' >  end > end Overloading method_missing is probable to cause more problems than it fixes :-) > That works - if not pretty, then at least it holds my view code together > while I fix i

[Rails] Re: Add a "filter" on the ERB <%= ... %>

2010-06-29 Thread Carsten Gehling
Michael Pavling wrote: > Does that make sense? It does make sense, and this is a process that I am currently working through. My example was just a single extract from the application, though, and there are many of these scattered all over the code. So what I really wants is a quick-fix that m

Re: [Rails] Add a "filter" on the ERB <%= ... %>

2010-06-29 Thread Colin Law
On 29 June 2010 08:40, Carsten Gehling wrote: > I have a site with a lot of view code like this: > > >  <%...@post.user.name%> > > > Unfortunately a lot of old posts have had their users deleted, so the > code above breaks the entire view. I am working on a larger cleanup on > the code, but in t

Re: [Rails] Add a "filter" on the ERB <%= ... %>

2010-06-29 Thread Michael Pavling
On 29 June 2010 08:40, Carsten Gehling wrote: > What I would like is to convert > <%...@post.user.name%> > to > <%=(@post.user.name) rescue ''%> No it's not. You shouldn't use exceptions to handle non-exceptional behaviour - and if you know that some posts have had their user deleted, then it's n

Re: [Rails] "show" action - restrict manual url change from user to view

2010-06-29 Thread Colin Law
On 29 June 2010 03:36, RailsFan Radha wrote: > > This is "show" action in my "category controller". > >   # Show --- >  def show >    # @category=Category.find(params[:category_id]) >     @category=Category.find(params[:category_id]) >  end > > "show" action - restrict manual url change from u

Re: [Rails] Re: list using a sql statement

2010-06-29 Thread Colin Law
On 29 June 2010 03:19, RailsFan Radha wrote: > RailsFan Radha wrote: >> >> I have a table called category and i want to show only the records where >> "status = A" in my list.erb >> >> currently, my list.erb shows all records from category table. >> but, i would like to show only the records where

[Rails] Authlogic and persistence token

2010-06-29 Thread Lesanglier Lesanglier
Hello, I would to know if if does it possible to have something like this : acts_as_authentic do |c| c.login_field = :user_name c.crypted_password_field = :user_passwd c.persistence_token = :pertok end Using the "pertok" field instead of the "persistence_token" field ? Or say to

Re: [Rails] list using a sql statement

2010-06-29 Thread Colin Law
On 29 June 2010 02:56, RailsFan Radha wrote: > > I have a table called category and i want to show only the records where > "status = A" in my list.erb > > currently, my list.erb shows all records from category table. > but, i would like to show only the records where status = 'A' > > for example:

[Rails] Add a "filter" on the ERB <%= ... %>

2010-06-29 Thread Carsten Gehling
I have a site with a lot of view code like this: <%...@post.user.name%> Unfortunately a lot of old posts have had their users deleted, so the code above breaks the entire view. I am working on a larger cleanup on the code, but in the meantime I would like to make a quickfix to get the views w