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
Related
I am completely new to ruby, don't know the 1st thing about rvm, gemset etc. Just forced to use a CLI tool (kensa by heroku) written in ruby and facing an issue.
The kensa tool seems to use a gem named rest-client. When I run it it throws an error:
/Users/shaharsol/.rvm/gems/ruby-2.4.2/gems/rest-client-1.8.0/lib/restclient/request.rb:163:in `fetch': key not found: :ciphers (KeyError)
Some searches suggest that v1.8 of rest-client is too old so I installed v2.0.2. Now when I do a gem list I get:
rest-client (2.0.2, 1.8.0)
When I run kensa again it still used to old version. So I went and modified it kensa.gemspec file (which is referred to from Gemfile) and to my best understanding told it to use the newer version:
s.add_runtime_dependency(%q<rest-client>, "~> 2.0")
Yet, when I run kensa again, it still uses the old rest-client 1.8.0!
What am I missing? What am I doing wrong? Or what else is required for the kensa to run with the new rest-client 2.0.2 ???
PS - If my problem doesn't relate at all to changing 1.8.0 => 2.0.2 please tell me what else to do. I really don't care which rest-client version kensa uses, I just need it to run!
To remove older version of the gem, you have two options:
# remove all versions of the gem
gem cleanup rest-client
After this, you can do 'bundle install' and only install the version you want.
# choose which one you want to remove
gem uninstall rest-client --version 1.8.0
After this, you will only have 2.0.2 version.
Hope this solves your problem.
I am trying to install Beef in a WIndows 10 - 64 bit PC.
I followed the instructions provided in the following link:
https://github.com/beefproject/beef/blob/master/INSTALL.txt
But I keep getting this error:
An error occurred while installing therubyracer (0.11.4), and Bundler
cannot continue. Make sure that gem install therubyracer -v '0.11.3'
succeeds before bundling.
I drilled down a bit & found that the installed version of therubyracer is 0.11.0beta1 x86-mingw32 whereas the installer is searching for version 0.11.3
In the link provided above, the following lines are mentioned in line 38:
Finally, edit beef's gem lock file by replacing the required ruby racer version with the version downloaded from the link above.
But when I do that I get this error:
Your lockfile is unreadable. Run rm Gemfile.lock and then bundle
install to generate a new lockfile.
Can anyone please help me out with this?
Doing what the error message suggests should do the trick. Just remove existing Gemfile.lock in beef project and then run bundle install command once again.
The Gemfile has the the following check:
# Windows support
if RUBY_PLATFORM.downcase.include?('mswin') || RUBY_PLATFORM.downcase.include?('mingw')
# make sure you install this gem following https://github.com/eakmotion/therubyracer_for_windows
gem 'therubyracer', '~> 0.11.0beta1'
elsif !RUBY_PLATFORM.downcase.include?('darwin')
gem 'therubyracer', '0.11.3'
end
So, it will generate a new Gemfile.lock file specific to Windows. The one in the repo is for Ubuntu/Debian.
Even after trying out the solution given by Uzbekjon, I wasn't able to get past the error. Beef requires a javascript runtime for the login page to properly show up. As suggested in the post given here, I got a workaround by installing Node.js
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.
I am trying to install chiliproject on a server, following the -well done- documentation I am hitting this error
Could not find gem 'rubytree (~> 0.5.2) ruby' in any of the gem sources listed in your Gemfile.
I did a gem install rubytree
I get this message
========================================================================
Thank you for installing rubytree.
WARNING: SIGNIFICANT API CHANGE in 0.8.0 !
------------------------------------------
Please note that as of 0.8.0 the CamelCase method names are DEPRECATED.
The new method names follow the ruby_convention (separated by '_').
The old CamelCase methods still work (a warning will be displayed),
but may go away in the future.
Details of the API changes are documented in the API-CHANGES file.
========================================================================
Successfully installed rubytree-0.8.1
1 gem installed
Installing ri documentation for rubytree-0.8.1...
file 'COPYING,API-CHANGES' not found
Installing RDoc documentation for rubytree-0.8.1...
file 'COPYING,API-CHANGES' not found
That is saying the installation was succesful. So why do I get the error ?
If the error is from the API change how can I request version 0.5.2 of the rubytree gem ?
When I do a gem list --local | grep 'rubytree'
I have this output rubytree (0.8.1)
So why is the system saying could not find gem 'rubytree' ?
thank you for any help,
Depending on what version of rails you are using (and it sounds like you are using a relatively newer one, if it's prompting you for your Gemfile), then you need to use Bundler to manage your gems.
Try editing your Gemfile, adding a new line that reads:
gem "rubytree", "< 0.6"
Then open up a console, and type this command
bundle install
This should fix your problems, but if you still get errors when running a command, then try typing bundle exec prior to the command (i.e. rails server becomes bundle exec rails server).
Currently, we require rubytree exactly in version 0.5.2 or 0.5.3, as specified in our Gemfile, the 0.8.1. version you installed by hand will not suffice that requirement, which is exactly what the error message states.
What seems a bit odd is the literal ruby in the error message. Could you please make sure that you have the exact unchanged Gemfile from the source on your system? Also, could you please remove any user-installed plugins and try again? Also, which ruby (type and version) on which operating system are you using?
-- UPDATE --
Ok its fixed. This is what I did. remove all ruby and rubygems completely. then install ruby1.9.1-full and rubygems1.9.1 then install the twitter gem.
Hi guys,
I am having trouble working with the Twitter gem. I am using ruby 1.8.7
After installing when I try to run a simple script I get this error
ruby twitter.rb
./twitter.rb:5: uninitialized constant Twitter (NameError)
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
from twitter.rb:2
I running this on a Ubuntu box. I checked with gem -list and I see the Twitter (1.1.0) is listed there.
this is the code I am trying to run
require "rubygems"
require 'twitter'
puts Twitter.user_timeline("test").first.text
Any ideas ?
I believe it only works with Ruby 1.9 If you want to use twitter gem try version 0.9 with Ruby 1.8.x
This works for me:
ruby-1.9.2-p0 > require 'twitter'
=> true
ruby-1.9.2-p0 > puts Twitter.user_timeline("test").first.text
TExES Pedagogy and Professional Responsibilities EC-12 Teacher Certification Test Prep Study Guid… - by Sharon A Wynne http://amzn.to/f3kF74
=> nil
which version of ruby are you using?
gouravtiwari21's comment seems to fix the problem, but it's wrong to suggest that the twitter gem requires 0.9.0 if you want to run it using Ruby 1.8.x.
You can check out the version compatibility here:
http://travis-ci.org/#!/jnunemaker/twitter
It shows the twitter gem working with Ruby installs as low as 1.8.7.
For me, it was an issue with having the correct dependent gems, as well as the correct versions.
Here's how I got it working:
I ran:
sudo gem list
And compared the versions of specific gems with what I found here:
https://github.com/jnunemaker/twitter/blob/master/HISTORY.md (I simply searched for the word 'dependency' to see which versions twitter cared about.
I also found this diff:
https://github.com/jnunemaker/twitter/commit/ac8114c1f6ba2da20c2267d3133252c2ffc6b6a3
And I compared the gems listed there with what I had installed, and I just made sure my system lined up with what I was seeing in the version notes. Oftentimes what happened is that I had multiple versions of a gem, and for some reason, the lower version was taking precedence.
I'm not sure why I still have to add
gem 'twitter', '1.7.1'
to my Gemfile, but alas, that's the last step required in order to get this stuff working.
Don't forget to restart your server, and you should be good!