Cucumber step definition for "Given that I'm logged in"
I've got a cucumber step: Given that I'm logged in I don't understand how I should implement it as a step definition. Could someone point me into right direction, tutorials, blogs etc. ...
I've got a cucumber step: Given that I'm logged in I don't understand how I should implement it as a step definition. Could someone point me into right direction, tutorials, blogs etc. ...
What is the proper way in ruby to call a method from within itself to rerun In the sample below when @dest_reenter is equal to yes I would want the b_stage method to execute again def b_stage if @dest_reenter == 'yes' @dest_reenter = nil b_stage end end ...
I want to fetch all the strings between _(" ") from my file. How may i fetch that? ...
I've tried this on a few machines on different networks, all running ruby 1.8.7 and I get the same result after a long wait. Net::HTTP.get(URI.parse('https://encrypted.google.com/')) Timeout::Error: execution expired but HTTP works fine Net::HTTP.get(URI.parse('http://www.google.com/')) After the inital timeout I get an EOFError ...
When I test a Sinatra app on my local box with rackup, every log message appears twice. How can I get them to appear only once? ...
I have a sqlite3 db in a rails app with the following schema ActiveRecord::Schema.define(:version => 20100816231714) do create_table "comments", :force => true do |t| t.string "commenter" t.text "body" t.integer "post_id" t.datetime "created_at" t.datetime "updated_at" end create_table "posts", :force ...
I am trying to search for all files of a given type (say .pdf) in a given folder and copy them to a new folder. What I need to be able to do is to specify a root folder and search through that folder and all of its subfolders for any files that match the given type (.pdf). Can anyone give me a hand on how I should search through the root...
I just upgraded to rails 3 but was running ruby 1.9.1 prior to the upgrade. Rails 3 doesn't support Ruby 1.9.1. How can I downgrade to ruby 1.8.7? ...
Rails 3.0.0.rc ruby 1.9.2dev (2010-05-31 revision 28117) [x86_64-darwin10.4.0] Today I upgraded to rails 3.0.0RC (from beta4) and ruby 1.9.2 (via RVM). Now when I do rake db:create in a new test app I get the below error. Anyone know what I'm doing wrong? I did 'bundle install' with no errors. DEPRECATION WARNING: Calling a method in ...
I had rvm installed for several months and it has system (1.8.7) and installed (1.9.1) rubies listed. And both versions worked fine. Yesterday I tried to update 1.9.1 but after installation it wasn't working and system ruby gone from rvm list. I removed rvm, made clean install of rvm. But when I'm installing 1.9.1 via rvm it says: info:...
test = "a" test.class_eval do # what is going on here??? end ...
This was asked in 2008. Hopefully there's a better answer now. How can you combine PDFs in ruby? I'm using the pdf-stamper gem to fill out a form in a PDF. I'd like to take n PDFs, fill out a form in each of them, and save the result as an n-page document. Can you do this with a native library like prawn? Can you do this with rjb and ...
Here is a extremely simple web page: test.html.erb: <div id="test_div"> Testing 1 2 3 </div> test.rjs: page.visual_effect :highlight, "test_div" Basically, I want my "test_div" to be highlighted when the webpage loads. But for some reason, the div doesn't highlight when I load the webpage. Does anyone know what's going o...
Are there any tools that I can run on my server to monitor multiple rails applications? I need to monitor the number of requests each application receives, how much memory each application is using, how much of the cpu is being used and other stats similar to those. I need to see the stats for each individual rails application. ...
I have a ruby array ['12','34','35','231'] I want to convert it into string '12','34','35','231' like that Please give some hint Thanks ...
When trying to install Bundler 0.8.1 on Ubuntu machine, it install fine but the executable "bundle" is no where to be seen. Other gems install successfully, including their executables. using: "gem install bundler --version=0.8.1" RubyGems Environment: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i486-li...
Hi, I want to perform an operation on a array returned from an ActiveRecord query. This is the functionality I would have done on the ActiveRecord directly. Modification.find(:all, :group=>'ref_id,start_date', :order=>'updated_at desc') The above is working fine as expected. But the problem is I cannot perform it directly for some re...
Possible Duplicate: how do i run appliaction as service in windows i created a ruby application and its working fine but when i run it as service it giving trouble. actully i have mysql as a databse in my application and i am using it to store only name of the file and placing the physical file on sambha server now when i run ...
i created a ruby application and its working fine but when i run it as service it giving trouble. actully i have mysql as a databse in my application and i am using it to store only name of the file and placing the physical file on sambha server now when i run my applioaction as as service it's not able to find the path of sambha server....
Does anyone know of a way to query OS X in order to find out how much time is actually left before it enters either system sleep or activates the display sleep (or even disk sleep), either via the command line, or any other method (Ruby or Objective-C for instance)? I thought something like pmset via the command line might have offered ...