Not able to install bundle - ruby

I am new to development of Capybara with Rspec using Ruby with selenium. I have installed Caybara and installed RSpec also. But when I am trying to install it is giving an error "Couldn't locate Gemfile". How to rectify the error? How to locate the Gemfile. Is there any Tutorial for Capybara and Rspec to understand better about those?
I am installing those on Windows8.1Pro

Related

cannot load such file -- capybara (LoadError)

I'm trying to run a ruby file that uses capybara and selenium.
When I run cucumber, I get the error :
cannot load such file -- capybara (LoadError)
I saw in another answer that, in order to solve this problem, I had to install poltergeist, but when I run - gem install poltergeist
, I get the error ERROR: While executing gem ... (ArgumentError)
wrong number of arguments (given 1, expected 0)
Any help will be appreciated
You need to include/install the capybara gem, not poltergeist.
I recommend running cucumber with params -v -b , so that you can see where it's failed with verbose & backtrace log.
cucumber -v -b <your_cucumber_features/tag>
The message
cannot load such file -- capybara (LoadError)
was prompted when you've defined to use capybara in your ruby file but your machine hasn't been installed that gem. So need installing capybara via
gem install capybara
However, gem will be installed to specific RVM, so that if you have any error, then try to see which Ruby version that you install onto your system. I suggest install rbenv so that you can manage it better.

Ruby Shoes App, Gem Chef: bad response Not Found 404

I'm trying to write a Shoes app that will call Chef classes and modules. To accomplish this, I'm using Shoes 3.2.21-gtk2 and using the following code before my Shoes app code:
Shoes.setup do
gem 'chef'
end
Shoes.app do
...
end
When I run the app from Shoes, it attempts to install chef, and even determines the latest version (12.0.3) however, I get the following error during the installation:
bad response Not Found 404 (https://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/pry-0.10.1-x86-mingw32.gemspec.rz)
This version of Shoes is using Ruby 2.1.5-p273, which satisfies the minimum requirement of the Chef gem: https://rubygems.org/gems/chef
Is there some bug in Shoes with its ssl code? Or am I missing something else?
I got this error too.
The error occurs when trying to install the "pry gem". In my case was a bug that happened in my old version of rubygems (2.4.6).
FIX:
1 - Install another version of rubygems
gem update --system 2.4.4
2 - Install pry
gem install pry
The error also happens with the 2.4.5 version of rubygems: https://github.com/rubygems/rubygems/issues/1120

Rails server command generates error report

When I used rails server command, found following errors in terminal. It shows that "could not find a JavaScript runtime". I am newbie in ROR and don't know to configure different files. I Google and found solutions of this problem 1 2 3. Still I am not getting the things. Please suggest some solutions.
Ruby and Rail versions on my system
Ruby version:- ruby 1.8.7 , Rails version:- Rails 3.2.6
I suppose you lack executable on your system/
Haven't you try to run gem install execjs or bundle install(from your project directory) in console?
UPDATE
Also visit execjs homepage and try instaling any of JS runtimes supported.
UPDATE 2
I was able to reproduce your error (with ruby 1.9.2). Just add gem 'therubyracer' to your Gemfile and run bundle install. For some weird reason ROR is not working out of the box on Ubuntu. See this and search for runtime word for more info.
PS
Please put your Gemfile here. This might help.
The error message also tells your to
See https://github.com/sstephenson/execjs for a list of available runtimes.
You have to install one of the JavaScript runtimes listed there:
therubyracer
therubyrhino
Node.js
Microsoft Windows Script Host
For Rails 3.2.6 I suggest to use Ruby 1.9.3. for better performance.

What is the easyest way to use gems in a macruby application, in XCode?

I need to include a rubygem in a simple macruby application i am creating in XCode. Using require 'rubygems' does not give an error, but the next line to require any other gems has a load error. I installed the gems using macgems. Thanks in advance.
The load error might be an indication that the gem doesn't work on Macruby. Post the error and someone might have more info on that gem or that error.
Did the gem actually install correctly? If it did install, does it work from the command line? Try creating a simple script that requires rubygems and your gem and run that on the command line outside of xcode and see if the problem is compatibility with that gem.
A while back in the 0.5 days I had this problem with a gem (miniexif iirc) that would install via macgems but not load or run. This might be a similar problem.

Test::unit and Rubymine "No tests were found"

I'm a newbie in Ruby and I try to use the test::unit framework with the RubyMine IDE (3.1.1).
I don't understand the note about test::unit here:
http://www.jetbrains.com/ruby/webhelp/test-unit-special-note.html
Specially this instruction: "Include test-unit gem in your Gemfile." I use gem install "test-unit" and attach it to my project but I still got 0 tests and the error message "No tests were found"
Make sure that you have a Gemfile in your project root which contains:
gem 'test-unit'
There is another reason that can cause some scenario not to be recognized. If there is an scenario with the same name in other feature, it may cause your scenario not to be detected.

Resources