May 29, 2014

Cucumber - HTTP request path is empty

Faced different errors while executing the Cucumber script.

I would like to share the same to all ... Hence posting the issues to all.


Error message I received while executing the Cucumber & ruby....

HTTP request path is empty.

Below is the proxy skipping script... which I got from a google mail response from MIKKO.

Thanks for the help...


=========================
env_no_proxy = (ENV['no_proxy'] || "").split(",")
env_no_proxy << "127.0.0.1"
ENV['no_proxy']=env_no_proxy.join(",")
=========================


Cucumber - Network error while fetching mime-type

Cucumber execution getting the error message like

network error while fetching http://rubygems.org/quick/marshal.4.8/mime-types-2.3.gemspec.rz


Go to the folder location of the project

I missed to find the solution to resolve this issue.

But I can mention here what are the commands I executed.

>> gem install paperclip

I tried to install the above gem. but Still I faced the issue with network error.

>> bundle
>> gem env
>> bundle env
>> bundle config
>>  gem install paperclip --verbose --backtrace --debug
>> gem clean
>> gem update
>> gem install rails


After executing the above commands, atlast I closed the my command prompt and ruby related information....

>> set http_proxy = http://<username>:<password>@hostname.com

Atlast I tried to install the paperclip gem again...


Now it works....

Still waiting for  time to check for... How I resolved the blocker.....



try to install the gem like

gem  install <gem name> --ignore-dependencies.

May 2, 2014

Ruby in Windows... What to do?



85% of Ruby on Rails Developers does not like windows machine... Reason they say windows machine will gives more conflict. If developer uses Linux then its very much easy to install the gem files.

Ruby> Its an language similar to Java, C, C++

Rails> It is a Framework which is developed from Ruby language to create WEB applicaitons.

Why Ruby on Rails? or Why ROR?
Faster in development
Ruby language is easy to learn.

with Ruby you can integrate with any types of application.

Ruby Site URL: http://ruby-lang.org/
Ruby on Rails Site URL: http://rubyonrails.org/

In Ruby; Everything is consider as an object...


Its time to work on Ruby in Windows.

1) Download the windows installer executable file in the below URL
http://rubyinstaller.org/

2) run the exec file and follow the installation steps...

It you are using the Executable file then the Environment variables are defined by its own.....


Suppose If you are trying with the Ruby folder package, then set Environment variable.

My System Env Variable: C:\Ruby192\bin

3) go to Start> Run > irb

It will open ruby console.....

that's it.... Its your time play with ruby language......

commands used>
Open command prompt:

> which ruby
> Where ruby
> gem list
> irb

===========================================================================
Query Running in your mind:
Q: Okay, This is already mentioned in many places. Then what is the special in this blog post......


Answer: Gem File> It is Similar to supporting Library file. Which contains predefined method and classes like an package

You can download the Gem file in below URL

>> http://rubygems.org/

If you wanna download any gem file, then

Open command prompt
> Gem list
> gem install <gem name>

whenever you give gem install then gem is downloaded from ruby gems repository to your local machine.....

> gem list
you can view the installed gems in your local machine

> bundle show <gem name>
You can view the path of the gem location

========================

gem installing few gems in windows, It will throw error....

It will ask you to install the Devkit in your machine.....

================================
If you feel error is not resolved, dont find any solution to proceed....  Struggling a lot and have no idea about the error in installing gem...

Then remove the gem folder in Ruby installed folder.... Where ? How?

FOLLOW THE BELOW:
1) Goto your command prompt

2) Look for ruby installed location
> where ruby
In my system
C:\Users\JeganRajKumar>where ruby
C:\Ruby193\bin\ruby.exe

3) then goto the gem file downloaded location. which is available in your library folder......
In my machine
C:\Ruby193\lib\ruby\gems\1.9.1\gems

4) Either rename the Gems folder or delete it... Rename will be the better option... You can have it as back up

5) In command prompt give GEM LIST command... It will show empty gem list....
> gem list

6) So we removed all the installed GEMS... Its time to install the gem files again... Now it will work....
Enjoy installing the ruby gems in WINDOWS

March 28, 2014

Tester Friend Oh my God > its my blog name

Tester Friend:

Who is the Tester?
Who is the Friend?
Why Tester?
Why Friend
How Friend?
Why Oh my God?
Then how it is my blog name?
Why Name like that?
Why this blog?

Still I am having lots of question now in my mind...

Then I check for answers for the all questions... Its my time to find it out...


Who is the Tester?
 >> I am the Tester or You are the Tester....

Who is the Friend?
>> You are my Friend. because you are reading my blog and you are gonna read my blog continuously.

Why Tester?
>> After reading this blog and you may gets confused. Asking yourself whether is it an article or blog post or what it is.
Also I tested and find out three things.
1) You know English.
2) You are having more patience.
3) You always keep yourself in smile.

Who Friend?
If a person takes more care about you then he is your friend. He helps you a lot and say you are right or wrong.

Why Friend?
>>Good Friend is a good teacher. You can get good thing as well as the bad things form them

How Tester Friend?
>> While reading this post or my blog you could see. Few good thing as well as few bad thing in it.... Now tell who is your friend

Why Oh my God?
>> Power is god ... That power asks me to write this blog

Then how it is my blog name?
random name which tell you to be your friend.

Why Name like that?
I created name like that... No reason behind it... now its becoming popular... With the help of you

Why this blog?
If I post this blog then  I am @ the top in google. while searching.





Happy Testing with Tester Friend

March 1, 2014

Browse and Upload the file in Cucumber & Capybara.


Browse and Upload the file in Cucumber & Capybara.

My Code in UI View:

<input type="file" name="multipartFile">


Browse Option:>

Then(/^I upload the file $/) do
  path = File.expand_path("a.txt")
  puts File.expand_path("a.txt")
  puts path
  attach_file('multipartFile', "C:\\Desktop\\a.txt")
end

Hope this script will be more useful.... Whenever you try to upload the files....


Use the below lines and upload the file. Use your scripting idea and share it......