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