[Rails] Stopping enter from submitting a form

2010-06-17 Thread Brent Jameson
Hey all, I'm working on a rails app that will be accepting input from a wide array of brandless barcode scanners. Is there anyway of making the return key tab to the next field instead of submitting the form? I know this is more of a javascript thing, but I just can't get it solved. -- You

[Rails] Need Help - New to RoR

2010-06-17 Thread Sangeetha
Hello All, I installed Ruby on Windows (using rubyinstaller-1.9.1-p378.exe from here - http://rubyforge.org/frs/?group_id=167). Then I ran gem install rails. I was following instructions here -http://oreilly.com/pub/a/ruby/ archive/rails.html?page=1 to create my first app. I was able to start

[Rails] Errno::ENOENT in User sessionsController#new No such file or directory - getcwd

2010-06-17 Thread bpfarmer
I cloned an existing git repo and get that error when I try to use script/server and view the application on a mongrel server. I can still access the models in script/console. Thanks, -Brendan -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk

Re: [Rails] Re: Install Plugins into vendor/plugins

2010-06-17 Thread Filipe Quadros Borges
Using command ./script/plugin install path/to/plugin.git does not install nothing to me. It never ends! 'command/plugin.rb' are using a 'git pull --depth 1 git://path/to/plugin.git' and this command never exits. I found something about a similar problem here:

[Rails] ARel table aliases

2010-06-17 Thread Pat Allan
Hi all I'm battling a little with Rails 3 - trying to get Thinking Sphinx working with it. What I need is some way to interrogate ARel joins to find out table aliases, given a certain association hierarchy. For example - a forum has a creator (User model), and many topics. Each topic has a

[Rails] Re: database.yml host read from yml

2010-06-17 Thread trybeee
YAML.load(ERB.new(File.read(path_to_file)).result) On Jun 16, 6:14 pm, Chris Habgood chabg...@gmail.com wrote: Ok, in my load_config I do this: Site = YAML.load_file(File.join(RAILS_ROOT, 'config', 'sites.yml')) Something like this in the database.yml? host: %= Site['name']['db'] % On

[Rails] Edge Rails Nested has_many :through Association

2010-06-17 Thread Randuin
So this functionality isn't supported natively in Rails 3 (or any versions before that for that matter) But I had found a work around via this blog post: http://geoff.evason.name/2010/04/23/nested-has_many-through-in-rails-or-how-to-do-a-3-table-join/ This didn't work on Rails 3 because it

[Rails] delete stale sessions in ror web application

2010-06-17 Thread Rajkumar Surabhi
hi, in my webapplication, user logins into application. i want to delete the stale sessions. and while before deleting the stale session auomatically i need perform on some operations on database. how to do this Regards, Rajkumar -- Posted via http://www.ruby-forum.com/. -- You received this

Re: [Rails] Stopping enter from submitting a form

2010-06-17 Thread Colin Law
On 16 June 2010 21:20, Brent Jameson brentjame...@gmail.com wrote: Hey all, I'm working on a rails app that will be accepting input from a wide array of brandless barcode scanners. Is there anyway of making the return key tab to the next field instead of submitting the form? I know this is

[Rails] irb problem

2010-06-17 Thread radu puspana
Hi guys, can you spare some time? i have this irb problem..when i try to enter this line : def show_text text the irb gives me this error No command 'def' found, did you mean: Command 'df' from package 'coreutils' (main) Command 'ref' from package 'elvis-tools' (universe) Command 'gdef' from

Re: [Rails] irb problem

2010-06-17 Thread Franz Strebel
i have this irb problem..when i try to enter this line : def show_text text the irb gives me this error No command 'def' found, did you mean: Are you sure you're in irb? It looks like you're just at the shell prompt. You need to type irb first to start it. -- You received this message

Re: [Rails] Need Help - New to RoR

2010-06-17 Thread Andy Jeffries
Look in your log file (your_app/log/*.log) - the error will be detailed in there. Also, it seems from the error message you're running in production mode, you should really switch to development then you'd see the full error message in your browser. Cheers, Andy -- Andy Jeffries

[Rails] Re: Allow blank on should validate_uniqueness_of

2010-06-17 Thread pepe
On Jun 17, 1:28 am, J. Pablo Fernández pup...@pupeno.com wrote: Where do you pass that? should validate_uniqueness_of(:email, :allow_blank = true) That doesn't work. That method takes only one argument: group/rubyonrails-talk?hl=en. -- J. Pablo Fernández pup...@pupeno.com

[Rails] Re: Stopping enter from submitting a form

2010-06-17 Thread pepe
I just read this up in a JS book. The submit button has actually 2 events happening sequentially. The first one is an onClick and the second one an onSubmit. Both can return false and stop the execution of the action. If onClick returns false onSubmit will not be executed. I guess you could

Re: [Rails] Errno::ENOENT in User sessionsController#new No such file or directory - getcwd

2010-06-17 Thread Colin Law
On 16 June 2010 23:43, bpfarmer bpfar...@gmail.com wrote: I cloned an existing git repo and get that error when I try to use script/server and view the application on a mongrel server.  I can still access the models in script/console. Someone may suggest an answer from this limited data but I

[Rails] Big performance issues regarding the browser

2010-06-17 Thread Nicolas Vincent
Hi ! I have a ruby server set up running Ruby v1.8.7 and those gems : actionmailer (2.3.8, 2.3.5, 2.3.3) actionpack (2.3.8, 2.3.5, 2.3.3) activerecord (2.3.8, 2.3.5, 2.3.3) activeresource (2.3.8, 2.3.5, 2.3.3) activesupport (2.3.8, 2.3.5, 2.3.3) fastthread (1.0.7) haml (3.0.12, 2.0.6) mysql

[Rails] Problem with options_for_select

2010-06-17 Thread Greg Ma
Hi, I have a problem with the form select. In the value field I have the generated html... %= f.select :brand_id, options_for_select([['Brands', 0]] + @search_brands.map { |b| [b.name, b.id]}), {:id = 'cbxBrand', :tabindex = (@tabindex += 1)} % This is the

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-17 Thread Frederick Cheung
On Jun 16, 12:07 pm, Ram yourstruly.vi...@gmail.com wrote: on my knees now :S Im not comfortable uninstalling everything and installing it from scratch again. Dont want to lose my existing setup. Pointers from anyone at all? There should be a log file detailing what went wrong when it

[Rails] Re: Learning RoR

2010-06-17 Thread rtacconi
I agree with DK: Agile Web Development with Rails, the last edition covers Rails 3. The tutorial (first part of the book) is what you need to get started. I watched the ruby videos at http://www.lynda.com/ but it is a bit outdated. Than do not forget popular screencasts sites: railscasts.com -

[Rails] Windows 7 and imagemagick

2010-06-17 Thread ashu
rails 2-.3.8 i am using install rmagick having an error fo Core_rl_rmaigick.dll mising re-install may solve the problem i think its issue of where to install imagemagick in which folder can you please suggest . -- You received this message because you are subscribed to the Google Groups Ruby

Re: [Rails] Need Help - New to RoR

2010-06-17 Thread Colin Law
On 16 June 2010 21:48, Sangeetha devsange...@gmail.com wrote: Hello All, I installed Ruby on Windows (using rubyinstaller-1.9.1-p378.exe from here - http://rubyforge.org/frs/?group_id=167). Then I ran gem install rails. I was following instructions here -http://oreilly.com/pub/a/ruby/

Re: [Rails] Allow blank on should validate_uniqueness_of

2010-06-17 Thread Colin Law
2010/6/15 J. Pablo Fernández pup...@pupeno.com: Hello, Using shoulda, any ideas how to allow blank when having this test: should validate_uniqueness_of(:email) I think there is confusion about your question. Are you asking how to allow blank in the validation itself (in which case

Re: [Rails] Allow blank on should validate_uniqueness_of

2010-06-17 Thread J . Pablo Fernández
I'm asking how to test the validation with shoulda with the new syntax, hence the line: should validate_uniqueness_of(:email) On Thu, Jun 17, 2010 at 10:45, Colin Law clan...@googlemail.com wrote: 2010/6/15 J. Pablo Fernández pup...@pupeno.com: Hello, Using shoulda, any ideas how to allow

Re: [Rails] Re: Allow blank on should validate_uniqueness_of

2010-06-17 Thread J . Pablo Fernández
pepe, I'm not asking how to do the validation, I'm asking how to test the validation with shoulda using the new syntax, I already have this line in the model: validate_uniqueness_of :email, :allow_blank = true in my tests I have: should validate_uniqueness_of(:email) should being a shoulda

Re: [Rails] Big performance issues regarding the browser

2010-06-17 Thread Colin Law
On 17 June 2010 09:36, Nicolas Vincent li...@ruby-forum.com wrote: Hi ! I have a ruby server set up running Ruby v1.8.7 and those gems : actionmailer (2.3.8, 2.3.5, 2.3.3) actionpack (2.3.8, 2.3.5, 2.3.3) activerecord (2.3.8, 2.3.5, 2.3.3) activeresource (2.3.8, 2.3.5, 2.3.3) activesupport

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-17 Thread Ram
Hello Fred, I can see the following errors in the mkmf.log residing in ../ mysql-2.8.1/ext/mysql_api/ . 1. (Under find_library: checking for mysql_query() in - lmysqlclient... no) conftest.c: In function 't': conftest.c:3: error: 'mysql_query' undeclared (first use in this

[Rails] Re: how to avoid (Net::SMTPFatalError) 555 5.5.2 Syntax error

2010-06-17 Thread Nimesh Nikum
Try to do like this: from Monaqasat nore...@monaqasat.com headers return-path = 'nore...@monaqasat.com' It worked for me !!! Thanks, Nimesh Nikum Karim Helal wrote: Any updates on how we can send a @from with a name before the email address? I want to be able to send emails using the

[Rails] Re: Problem with options_for_select

2010-06-17 Thread Greg Ma
Ok, I find out, it works without the options_for_select -- 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

Re: [Rails] Re: Allow blank on should validate_uniqueness_of

2010-06-17 Thread Colin Law
On 17 June 2010 09:18, pepe p...@betterrpg.com wrote: On Jun 17, 1:28 am, J. Pablo Fernández pup...@pupeno.com wrote: Where do you pass that? should validate_uniqueness_of(:email, :allow_blank = true) That doesn't work. That method takes only one argument: group/rubyonrails-talk?hl=en. --

[Rails] Re: Rails 3: link_to with data-confirm

2010-06-17 Thread Michael Rigart
Hi Ray, I fixed the problem some time ago, but I'm not sure anymore what the problem was. I know I had some other problems as well, And they where all related to a conflicting javascript library that I developed. It was not conflicting with rails.js but with prototype.js . I know I also

Re: [Rails] Need Help - New to RoR

2010-06-17 Thread kannav rajeev
check yours db table does that exists ? On Thu, Jun 17, 2010 at 1:31 PM, Colin Law clan...@googlemail.com wrote: On 16 June 2010 21:48, Sangeetha devsange...@gmail.com wrote: Hello All, I installed Ruby on Windows (using rubyinstaller-1.9.1-p378.exe from here -

Re: [Rails] Re: how to avoid (Net::SMTPFatalError) 555 5.5.2 Syntax error

2010-06-17 Thread kannav rajeev
use action mailer optional tls http://douglasfshearer.com/blog/gmail-smtp-with-ruby-on-rails-and-actionmailer On Thu, Jun 17, 2010 at 2:45 PM, Nimesh Nikum li...@ruby-forum.com wrote: Try to do like this: from Monaqasat nore...@monaqasat.com headers return-path = 'nore...@monaqasat.com'

[Rails] Interpreter Problems

2010-06-17 Thread Pale Horse
I really aren't sure why but my interpreter continues to fail after an unknown amount of requests or time on my local (home) computer. I've tried following instructions from people who have encountered similar problems with no success. Is it necessary for me to provide you with version details

Re: [Rails] Interpreter Problems

2010-06-17 Thread Colin Law
On 17 June 2010 12:17, Pale Horse li...@ruby-forum.com wrote: I really aren't sure why but my interpreter continues to fail after an unknown amount of requests or time on my local (home) computer. I've tried following instructions from people who have encountered similar problems with no

[Rails] Re: Allow blank on should validate_uniqueness_of

2010-06-17 Thread J . Pablo Fernández
No, allowing blank is fine, the validation is this: validate_uniqueness_of(:email, :allow_blank = true) The issue is writing the test. On Jun 17, 10:47 am, Colin Law clan...@googlemail.com wrote: On 17 June 2010 09:18, pepe p...@betterrpg.com wrote: On Jun 17, 1:28 am, J. Pablo

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-17 Thread Frederick Cheung
On Jun 17, 9:58 am, Ram yourstruly.vi...@gmail.com wrote: Hello Fred, I can see the following errors in the mkmf.log residing in ../ mysql-2.8.1/ext/mysql_api/ . dumb question: do you have the apple developer tools installed? Fred 1. (Under find_library: checking for mysql_query() in -

[Rails] combobox from array

2010-06-17 Thread Maese
Hi, I'm new in ruby and i need do the next: I want get a combobox from an array (@array) and save that value in a table called form, into a field called combo, i want save the value, not an id someone could tell me what i have to write? Thanks -- You received this message because you are

Re: [Rails] Need Help - New to RoR

2010-06-17 Thread lucas franceschi
as long as I understood, this is your very first app right? so, maybe some really basic questions will help... what DB are you using? and... do you have de driver gem for that DB? I am not sure if I`m right, but I could simulate your error, and look at the output, on the server terminal window:

[Rails] Can i use a hash on a collection_select? If don't, alternatives.

2010-06-17 Thread Miguel.camba
In my current application, i have food categories: mexican, home made, japanese, ect As these categories only have ID and name, no other attributes, i dont want to create a table on the DB. My first idea was to create a constant named FOOD_CATEGORIES, that is has like: FOOD_CATEGORIES = {

[Rails] syntax error, unexpected kEND, expecting $end

2010-06-17 Thread Michael Sopira
I get this error /Users/sopira/rubydev/hello/app/models/spracovatel.rb:5: syntax error, unexpected kEND, expecting $end on the 5th line of the code, which has got just (and only) 5 line: CODE: Class Spracovatel def spracovat return 5 end end What can cause this error? After digging all

Re: [Rails] Can i use a hash on a collection_select? If don't, alternatives.

2010-06-17 Thread Colin Law
On 17 June 2010 12:17, Miguel.camba miguel.ca...@gmail.com wrote: In my current application, i have food categories: mexican, home made, japanese, ect As these categories only have ID and name, no other attributes, i dont want to create a table on the DB. My first idea was to create a

[Rails] Re: Big performance issues regarding the browser

2010-06-17 Thread Marnen Laibow-Koser
Nicolas Vincent wrote: [...] I'm facing a serious issue : when the developped site is browsed with firefox, eveything is clean and fast. When browsed with IE, it is ve sl (more than a minute for each page to show). I checked various parameters on the server, in the browser,

Re: [Rails] syntax error, unexpected kEND, expecting $end

2010-06-17 Thread Colin Law
On 17 June 2010 12:21, Michael Sopira sop...@gmail.com wrote: I get this error /Users/sopira/rubydev/hello/app/models/spracovatel.rb:5: syntax error, unexpected kEND, expecting $end on the 5th line of the code, which has got just (and only) 5 line: CODE: Class Spracovatel That should be

Re: [Rails] Interpreter Problems

2010-06-17 Thread Ivan Nastyukhin
try to use ree http://www.rubyenterpriseedition.com/ Ivan Nastyukhin dieinz...@me.com On Jun 17, 2010, at 3:17 PM, Pale Horse wrote: I really aren't sure why but my interpreter continues to fail after an unknown amount of requests or time on my local (home) computer. I've tried

[Rails] How to run nifty generators in rails 3.0

2010-06-17 Thread karnati kiran
Dear all, I want to run nifty generators in* Rails 3.0* but it not accepts. Please send me the information,Please send me the commands for authentication Thanks -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this

Re: [Rails] Rails won't execute backticked OS commands

2010-06-17 Thread Jeffrey L. Taylor
There is probably no or different path. Try with an absolute file name, e.g., `/usr/bin/commmand args`. HTH, Jeffrey Quoting Greg Willits li...@ruby-forum.com: I'm at a loss as what to look for... I can issue a command result = `some_os_command_string` on my dev system just fine in both

Re: [Rails] How to run nifty generators in rails 3.0

2010-06-17 Thread Peter De Berdt
On 17 Jun 2010, at 14:42, karnati kiran wrote: I want to run nifty generators in Rails 3.0 but it not accepts. Please send me the information,Please send me the commands for authentication From the Github site and the README: Rails 3 To use Nifty Generators with Rails 3 you will

[Rails] Re: Big performance issues regarding the browser

2010-06-17 Thread Nicolas Vincent
Yes I'm using JavaScript ; I tried disabling it but it didn't solved the problem. I found a part of the solution : put the keepalive_timeout to 0. Now it's as speedy on Firefox than IE !! But ... the bigger pictures don't want to display anymore ... Even if I just try to load a pictures

Re: [Rails] tabular view gem in script/console

2010-06-17 Thread Leonardo Mateo
On Thu, Jun 17, 2010 at 12:30 AM, Chamnap chamnapchh...@gmail.com wrote: I remember there is a gem on github that is able to display tabular view like mysql console in script/console. Anyone knows, I seem to forget, couldn't find it? Hi, the gem you're asking for is hirb. Install it and then

[Rails] Re: ONMOUSEOVER CELL CHANGING LINKS COLOR

2010-06-17 Thread Antonio Dos santos
I sincerely apologize for having spelled the title in capital letters -- 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

[Rails] Re: ONMOUSEOVER CELL CHANGING LINKS COLOR

2010-06-17 Thread Antonio Dos santos
80% of visitors use IE, but thanks for your help. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this

[Rails] Re: passenger and apache mpm's

2010-06-17 Thread Bruno Sousa
Thanks for replying Hongli. But, even with worker mpm installed, passenger installation asks me to install development headers and apxs2 binary for apache2-mpm-prefork. Why is that? Hongli Lai wrote: On Jun 17, 12:47�am, Bruno Sousa li...@ruby-forum.com wrote: Hi! Is it safe to run phusion

Re: [Rails] Re: Field validation

2010-06-17 Thread lucas franceschi
well... in fact... you did defined it as an integer so, dont expect to get any other class thats not Fixnum or Bignum... but, you can also use some model validations to be sure that the user entered an integer... try validates_numericality_of :cost it will stop your user from entering

Re: [Rails] Re: Field validation

2010-06-17 Thread lucas franceschi
try looking Herehttp://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#M001401 . Sempre Alerta Para Servir, Lucas Franceschi Equipe de Programação (Automação) SGI Sistemas (049) 9922-3360 On Thu, Jun 17, 2010 at 12:14 PM, lucas franceschi lukas1...@gmail.comwrote:

Re: [Rails] Re: Interpreter Problems

2010-06-17 Thread Colin Law
On 17 June 2010 16:06, Pale Horse li...@ruby-forum.com wrote: Ruby interpreter (CUI) 1.8.6 [i386-mswin32] has stopped working. This occurs when script/server is running. I've tried upgrading my version of Ruby to a more recent version, such as 1.9.1 and downgrading my version of Ruby to an

[Rails] Re: Re: Interpreter Problems

2010-06-17 Thread Pale Horse
Colin Law wrote: Googling for the error string found numerous hits suggesting that this is a problem with MySQL version 5.1 on Vista, and reverting to 5.0 fixed it. Are you on 5.1? Colin That, I have already tried with no success. -- Posted via http://www.ruby-forum.com/. -- You

[Rails] Re: Can i use a hash on a collection_select? If don't, alternatives.

2010-06-17 Thread Miguel.camba
I dont think so. I want to show a select that shows que values of the hash but the stored data when you submit a form is the key of that value un the hash. On Jun 17, 2:29 pm, Colin Law clan...@googlemail.com wrote: On 17 June 2010 12:17, Miguel.camba miguel.ca...@gmail.com wrote: In my

[Rails] Subdomains

2010-06-17 Thread David Zhu
hi, Is there a way for me to have subdomains on my rails project? For example, if I create a post, i get this URL- http://www.localhost:3000/posts/ (what ever number) How can I make the route so that it is title.localhost:3000/ title is a field of my posts. Is there a way to do

[Rails] Re: Re: Forcing helper like link_to to use single quotes

2010-06-17 Thread Sharkie Landshark
Dear Friends, I am the original poster. I use double quote for all Ruby strings in my Ruby codes. But, I use single quotes for HTML attributes. How would I force such behavior even though it is not compliance etc. -- Posted via http://www.ruby-forum.com/. -- You received this message

Re: [Rails] ONMOUSEOVER CELL CHANGING LINKS COLOR

2010-06-17 Thread Peter De Berdt
On 17 Jun 2010, at 16:36, Antonio Dos santos wrote: I work with tables. I have many links in one cell and I wish when onmouseover the cell all links changing for the same new color. One link is possible. Many links, it is possible? Do it using CSS, it going to be the most efficient way:

[Rails] Re: mysql gem install not happening on Mac OS Leopard - any inputs at all??

2010-06-17 Thread Ram
:) I do. And no, not a dumb question. Im happy answering *any* question if it means you can help me fix this hair-loss-causing issue!!! On Jun 17, 5:21 pm, Frederick Cheung frederick.che...@gmail.com wrote: On Jun 17, 9:58 am, Ram yourstruly.vi...@gmail.com wrote: Hello Fred, I can see the

[Rails] Re: Can i use a hash on a collection_select? If don't, alternatives.

2010-06-17 Thread Miguel.camba
I have just found a solution, but using a helper In application_helper i wrote this function: def select_from_hash(object, name, arg) select = select id=\#{object}_#{name}\ name=\#{object} [#{name}]\ arg.each do |i,e| select += option value=\#{i}\#{e}/option end select +=

Re: [Rails] Covert HTML to PDF

2010-06-17 Thread Peter De Berdt
On 17 Jun 2010, at 17:04, Rails Learner wrote: I am working on a website where I am required to convert an HTML view into a PDF document. I have found some gems and plug-ins like PDF::Writer, but none of these are good for converting HTML and CSS to PDF file. I found a gem called Princely

[Rails] Re: Re: Forcing helper like link_to to use single quotes

2010-06-17 Thread Ar Chron
Sheesh, I don't know... Smack yourself in the head every time you type a double-quote for an HTML attribute??? Use an IDE and re-write the syntax rules for the language recognition so it does not allow double-quotes for HTML attributes? Surely, there are more important things you could be

[Rails] Re: Rails 3: link_to with data-confirm

2010-06-17 Thread Ray Parker
I'll check into 1.7. I confirmed that this is a problem with Rails3.beta4: Create a new project, generate a scaffold for some Foo class. Confirm that the delete link from the index page gives you a confirmation dialog. Change the Destroy text to an image_tag and the confirmation no longer

[Rails] Re: ONMOUSEOVER CELL CHANGING LINKS COLOR

2010-06-17 Thread Antonio Dos santos
Matter resolved. Thank again. -- 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

Re: [Rails] How to run nifty generators in rails 3.0

2010-06-17 Thread karnati kiran
Thank you Peter -- 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.com. For

Re: [Rails] Covert HTML to PDF

2010-06-17 Thread Ivan Nastyukhin
its easy use pdf-kit ) Ivan Nastyukhin dieinz...@me.com On Jun 17, 2010, at 7:14 PM, Joshua Martin wrote: I was also going to suggest wkthml2pdf... but in the easy to use form of a plugin called wicked_pdf... See this tutorial..

[Rails] Re: Rails application generator fails after installing version 3.beta4

2010-06-17 Thread Yacobus Reinhart
I am using ruby 1.8.7, when running : rails new rails3_test --skip-git I have no problem with that. Are you sure that you installed rails 3 correctly including all dependencies? what happen if you try : rails new rails3_test I guessed that there was a problem with git so thats why I used skip

[Rails] Re: Covert HTML to PDF

2010-06-17 Thread Rails Learner
Thanks Everyone for your suggestions. Appreciate your time and reply! -- 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

[Rails] session hash set from outside program?

2010-06-17 Thread Sindri Guðmundsson
Hi, I have had my new rails program up for a few days now. I'm running it on Ubuntu 10.4 with apache2 in another location than the website it's made for (it's a standalone database application for physiotherapists). The people I made it for now want me to deploy it to the public part of their

[Rails] Re: Split model in few files

2010-06-17 Thread Ken Boss
Max Williams wrote: Use modules, which are included not required. This is much cleaner than overriding the class as you are doing above. You might find that you can factor out some functionality such that other classes can use it as well. Put the modules in lib and keep your models

Re: [Rails] Re: Split model in few files

2010-06-17 Thread Rob Lacey
You want to do this, as its the class that needs to evaluate this method, not the module.  class Project ActiveRecord::Base    include ProjectValidations  end  module ProjectValidations    validates_presence_of :project_name  end module ProjectValidations def self.included(base)

[Rails] Help .. A question about if then

2010-06-17 Thread bumper
Please be gentile ... I am new at this ror thing I have a view which looks like this h1Nicaragua Stamps/h1 table id =stamps tr thScott/th thMaxwell/th thDescription/th thUrl/th thMint/th thUsed/th /tr % @stamps.each do |stamp| % tr class=alt td%=h stamp.Scott

[Rails] Re: Recursive self-referential many-to-many relationship

2010-06-17 Thread Toby Rodwell
Marnen Laibow-Koser wrote: You want awesome_nested_set, which will let you do that with one query. The Glue model is unnecessary. Thanks very much for the info. I've had a quick look at the documentation and I see it makes use of fields :lft and :rgt -I guess I can use aliases for these,

[Rails] Re: Rails application generator fails after installing version 3.beta4

2010-06-17 Thread Stewart
I am running 1.9.2 not 1.9.7 but I am going to assume your talking about 1.9.2 and its a typo :) ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-darwin9.8.0] is the version I am running. I used RVM to install ruby 1.9.2 rvm install 1.9.2 All of the gems seem to be installed correctly. Here is my

[Rails] Re: Help .. A question about if then

2010-06-17 Thread Ar Chron
% if stamp.Mint == true % img src=/images/yes.gif alt = yes/ %else% img src=/images/no.gif alt = no/ %end% /td td % if stamp.Mint == true % img src=/images/yes.gif alt = yes/ %else % img src=/images/no.gif alt =

[Rails] Re: Re: Split model in few files

2010-06-17 Thread Ken Boss
Rob Lacey wrote: You want to do this, as its the class that needs to evaluate this method, not the module. module ProjectValidations def self.included(base) base.send :validates_presence_of, :project_name end end Thanks for the pointer, Rob. But I've got a lot more of these

[Rails] LoadError: no such file to load -- openssl, following Rails Guides

2010-06-17 Thread James Fisher
[With apologies for cross-posting at http://railsforum.com/viewtopic.php?id=39587] Hi all, I'm following the edge 'getting started' guide at http://guides.rails.info/getting_started.html, running ROR 3. I'm running Ruby 1.9.2 (as instructed by the guide), installed using RVM. I get an error

[Rails] Re: Using Roles but don´t want to show them

2010-06-17 Thread Mark
Thank you for your answer but i don't understand what you mean. I don't have a popup on the form. In my view there are in the sign in form the three checkboxes []admin []moderator []author So there you can choose what function you want to have. But no one else has to be admin. Everybody has to

Re: [Rails] Re: Using Roles but don´t want to show them

2010-06-17 Thread Colin Law
On 17 June 2010 21:51, Mark mjonas.m...@googlemail.com wrote: Thank you for your answer but i don't understand what you mean. I don't have a popup on the form. In my view there are in the sign in form the three checkboxes []admin []moderator []author So there you can choose what function

[Rails] Re: Recursive self-referential many-to-many relationship

2010-06-17 Thread Marnen Laibow-Koser
Toby Rodwell wrote: Marnen Laibow-Koser wrote: You want awesome_nested_set, which will let you do that with one query. The Glue model is unnecessary. Thanks very much for the info. I've had a quick look at the documentation and I see it makes use of fields :lft and :rgt -I guess I

[Rails] Re: Subdomains

2010-06-17 Thread Franco Catena
You can do that with request.subdomains inside a controller. See http://api.rubyonrails.org/classes/ActionController/Request.html#M000526 If you want to change your primary key (or the key used for search) try with to_param. See http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M001840

[Rails] cannot install Mongrel gem w ruby-1.9.2-preview3 [ x86_64 ] and Rails 3.0.0.beta4 [OS X 10.6.4]

2010-06-17 Thread Erwin
error in make ... yves$ sudo gem install mongrel Building native extensions. This could take a while... ERROR: Error installing mongrel: ERROR: Failed to build gem native extension. /Users/yves/.rvm/rubies/ruby-1.9.2-preview3/bin/ruby extconf.rb checking for main() in -lc... yes

[Rails] Re: Recursive self-referential many-to-many relationship

2010-06-17 Thread Toby Rodwell
Marnen Laibow-Koser wrote: Toby Rodwell wrote: Marnen Laibow-Koser wrote: You may be able to use aliases, but how does this solve the basic problem of adding fields to the DB? I don't add fields (or even records) to this database - I just use RoR as way a way to get data out in a useful

[Rails] Re: Mac and Rails

2010-06-17 Thread Marnen Laibow-Koser
Andy Jeffries wrote: I have been just tasked to learn Rails for a new project and have been given Mac machine for it. I have never used a Mac / Linux ever. I have used Rails before on Windows. I need to set up Rails development env on this Mac machine. Its Mac OS X - Snow Leopard. The

[Rails] Re: Recursive self-referential many-to-many relationship

2010-06-17 Thread Marnen Laibow-Koser
Toby Rodwell wrote: Marnen Laibow-Koser wrote: Toby Rodwell wrote: Marnen Laibow-Koser wrote: You may be able to use aliases, but how does this solve the basic problem of adding fields to the DB? I don't add fields (or even records) to this database - I just use RoR as way a way to get

[Rails] Re: We're sorry, but something went wrong...

2010-06-17 Thread Marnen Laibow-Koser
GFP wrote: I am an RoR newb, so bear with me here. I am on an Intel based Mac running OS X 10.4.11 Er, why are you still on Tiger? I have started the 'RoR Essentials' tutorial on lynda.com. Don't. That tutorial is way out of date. You won't be able to use it with current Rails versions.

[Rails] Why do rails calls a method when I'm calling a property?

2010-06-17 Thread Omar Renteria
Well, I'm starting on RoR, so I got a Book called simply rails...Following the steps in it sometimes when I try to call a property, the browser shows me the next exception: undefined method `name' for nil:NilClass I don't know why...here's my controller: #Controller starts here class

[Rails] Re: Why do rails calls a method when I'm calling a property?

2010-06-17 Thread Omar Renteria
I would also add that the trouble is in Show view/controller. -- 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

[Rails] Need Full-time Senior Ruby Dev with CSS/Jquery skills etc

2010-06-17 Thread Jan Drake
Subject says it all. jan_dr...@hotmail.com -- 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,

Re: [Rails] Need Full-time Senior Ruby Dev with CSS/Jquery skills etc

2010-06-17 Thread Philip Hallstrom
On Jun 17, 2010, at 4:09 PM, Jan Drake wrote: Subject says it all. jan_dr...@hotmail.com No... it doesn't... :-) Company? Location? On-site or telecommute? etc... -philip -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to

[Rails] Re: Why do rails calls a method when I'm calling a property?

2010-06-17 Thread Marnen Laibow-Koser
Omar Renteria wrote: Well, I'm starting on RoR, so I got a Book called simply rails...Following the steps in it sometimes when I try to call a property, the browser shows me the next exception: undefined method `name' for nil:NilClass That's how Ruby works: all data access is done through

[Rails] Re: Off Topic Advice Needed (Time objects)

2010-06-17 Thread Marnen Laibow-Koser
Ants Pants wrote: I know this is a Ruby question but I'm not on any Ruby mailing lists Then get on one (perhaps ruby-talk) and ask there. Don't make lazy excuses for asking off-topic questions. and it's for a Rails project (so might come under select_time etc. ;) ) That may be a better

[Rails] Re: Re: Install Plugins into vendor/plugins

2010-06-17 Thread Marnen Laibow-Koser
Filipe Quadros Borges wrote: Using command ./script/plugin install path/to/plugin.git does not install nothing to me. It never ends! 'command/plugin.rb' are using a 'git pull --depth 1 git://path/to/plugin.git' and this command never exits. Then you probably need to install Git. Best, --

[Rails] Re: Stopping enter from submitting a form

2010-06-17 Thread Marnen Laibow-Koser
Brent Jameson wrote: Hey all, I'm working on a rails app that will be accepting input from a wide array of brandless barcode scanners. Is there anyway of making the return key tab to the next field instead of submitting the form? I know this is more of a javascript thing, You are correct.

[Rails] Re: RoutingError

2010-06-17 Thread Aashish Kiran
Bb Serviss wrote: What do you have in your routes.rb file to setup the custom route? http://guides.rubyonrails.org/routing.html thank you for reply, it helped me answer is %p or %p Upload a vCard file to import people into your account. %p -

[Rails] Re: combobox from array

2010-06-17 Thread MichaelF
To get what you want you need two parts... First you need an array of the objects in question and then you need a field on a form that uses that array. To create the array you could do something like: def create_chapter_list chapters = Chapter.find(:all) chapter_list = Array.new

[Rails] link_to_remote the right way in Rails 3.0?

2010-06-17 Thread Sharkie Landshark
I have been using link_to_remote forever now. I have also been using jquery through jrails. I am readying my code for Rails 3.0, and am wondering what is the best way to accomplish. For example, I have something like this all over in Rails 2.0 %= link_to_remote XXX, { :url

[Rails] prototip not working in ie8

2010-06-17 Thread Tony Augustine
i Hav created an application for prototip 2 in rails, application works well in firefox and ie7 but fails to work in ie8, can anyone provide ssolutions,please help me Thanks, Mathew A -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

  1   2   >