[Rails] Test files downloads with Cucumber

2010-11-16 Thread John Wu
Hi everybody: I'm writing tests for a future application with Cucumber and Capybara and I just want to know if there is anyway to check if the download links and/or the files are OK. An example scenario would be the following one: Scenario: Checking links Given I am logged in as ... When I

[Rails] Re: Test files downloads with Cucumber

2010-11-16 Thread John Wu
Marnen Laibow-Koser wrote in post #961883: Why do you want to use Cucumber to test that the files are OK? It seems to me that this is properly done in your model specs, by testing the methods that generate the files. Hi, thank you very much for the answer. Sorry for the explanation, by OK

[Rails] Re: Test files downloads with Cucumber

2010-11-16 Thread John Wu
At the moment, using the name to check the file is enough. By the way, do you know anyway to check if a sent mail have an attachment using Cucumber? Thanks again -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on

[Rails] Re: Test files downloads with Cucumber

2010-11-16 Thread John Wu
Marnen Laibow-Koser wrote in post #961899: John Wu wrote in post #961894: At the moment, using the name to check the file is enough. OK. Then you presumably already know how to do that. In fact, that's the main question because I have no idea how to do that. By the way, do you know

[Rails] convert app to production

2010-03-19 Thread John Wu
Hi, How to change rails 2.3.5 app to production? I couldn't find ENV[RAILS_ENV] under config/environment.rb Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

[Rails] Re: pdf-stamper

2010-03-10 Thread John Wu
, 2010-03-09 at 16:58 +0100, John Wu wrote: Hi, I have installed both pdf-stamper and rjb on my machine, and when I tired the following code in my controller code pdf = PDF::Stamper.new(YellowReq.pdf) I got an error uninitialized constant HomeController::PDF same error

[Rails] Re: Re: pdf-stamper

2010-03-10 Thread John Wu
that your experience with ruby and with rails are somewhat limited. Craig On Wed, 2010-03-10 at 20:38 +0100, John Wu wrote: = [] Craig White wrote: depends upon what/where you've got installed (jre or jdk) but generally... export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JAVA_HOME

[Rails] Re: Re: Re: pdf-stamper

2010-03-10 Thread John Wu
= filename, :type = application/pdf end end But the browser can not open the pdf. It says it is empty. What is the correct way to do this? Craig White wrote: On Wed, 2010-03-10 at 22:24 +0100, John Wu wrote: Thanks for the response. I want to narrow down

[Rails] Re: Re: Re: Re: pdf-stamper

2010-03-10 Thread John Wu
Thank you! -- 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

[Rails] pdf-stamper

2010-03-09 Thread John Wu
Hi, I have installed both pdf-stamper and rjb on my machine, and when I tired the following code in my controller code pdf = PDF::Stamper.new(YellowReq.pdf) I got an error uninitialized constant HomeController::PDF I have set up java home export JAVA_HOME = '/Library/Java/Home' How to set up

[Rails] edit existing PDF as template

2010-03-08 Thread John Wu
Hi, I am new to rails. I need to edit an existing pdf file and fill in some data and send it to browser, how to implement this? Is there an example online I can look at it? Thanks! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google

[Rails] Re: edit existing PDF as template

2010-03-08 Thread John Wu
Thanks for response. Can you give me an example for this? Can prawn edit existing pdf file? Craig White wrote: On Tue, 2010-03-09 at 01:29 +0100, John Wu wrote: Hi, I am new to rails. I need to edit an existing pdf file and fill in some data and send it to browser, how to implement

[Rails] Re: Re: edit existing PDF as template

2010-03-08 Thread John Wu
Thank you so much! I tried the code and got uninitialized constant HomeController::Fdf -- 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

[Rails] Restful-authentication plugin for rails3

2010-03-05 Thread John Wu
Hi, I just installed Restful-authentication plugin and tried rails g authenticated user sessions and got Could not find generator authenticated. What is the problem? Thanks -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups

[Rails] Two Version of Rails on one machine

2010-03-05 Thread John Wu
Hi, I installed rails3 on my mac and after installing 2.3.5 using gem install rails -v 2.3.5, if I run gem list rails, I got *** LOCAL GEMS *** rails (3.0.0.beta, 2.3.5) But if I run rails _3.0.0.beta_ test got the following error can't find executable rails for rails-3.0.0.beta

[Rails] Routing Error on rails3

2010-02-26 Thread John Wu
Hi All, I am new to Ruby on Rails and have rails3 installed. After I type this on the command line $rails g controller Pages home contact then, I go to http://localhost:3000/pages/home I got Routing Error No route matches /pages/contact How can I fix this problem? Thanks! -- Posted via

[Rails] Re: Routing Error on rails3

2010-02-26 Thread John Wu
Thanks for the reply. I didn't change rout file. SampleApp::Application.routes.draw do |map| end What do I need to add? Conrad Taylor wrote: On Fri, Feb 26, 2010 at 12:47 PM, John Wu li...@ruby-forum.com wrote: I got Routing Error No route matches /pages/contact How can I fix

[Rails] Re: Routing Error on rails3

2010-02-26 Thread John Wu
Thanks, How to uninstall it on mac? Can I have two version of Rails on same machine that I can choose one to run? Colin Law wrote: On 26 February 2010 20:47, John Wu li...@ruby-forum.com wrote: Hi All, I am new to Ruby on Rails and have rails3 installed. Did you really mean to start

[Rails] Re: 404 error in route

2009-03-25 Thread John Wu
Anyone can help on this one? I block on this issue for a about 2 weeks. 2009/3/24 johnwum...@gmail.com johnwum...@gmail.com Hi, I get a very strang error when I deploy my rails 2.2.2 application to the server. The application works when I start it with script/server. but when I deploy the