Invalid argument error installing 'ruby-box' gem - ruby

Any ideas why I get this error when trying to install the ruby-box gem?
C:\>gem install ruby-box
ERROR: While executing gem ... (Errno::EINVAL)
Invalid argument - C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/ruby-box-1.2.0/spec/fixtures/i☺ e?↨f§↓.jpg
It seems to be complaining about the ruby-box-master\spec\fixtures\遠志教授.jpg file, which is not written in English.

You should probably move to the newer ruby SDK: https://github.com/attachmentsme/ruby-box
It is all built on the V2 API. V1 API will be shut down at the end of 2013.

Update ruby-box to 1.2.1 (still need to test it)

Related

Solargraph not working in Visual Studio Code

I have the following error in my VS Code:
[Error - 3:51:12 PM] Starting client failed
/usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem solargraph (>= 0.a) with executable solargraph (Gem::GemNotFoundException)
from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
from /usr/local/bin/solargraph:23:in `<main>'
I currently use rbenv and have as global and only Ruby version 2.6.3
What seems to be the problem here? why do I see a ruby/2.6.0/ above if the version is 2.6.3?
Thanks for the help!
If all else fails, you can try setting solargraph.commandPath to the executable's absolute path. Running which solargraph should give you the path to use.
I found the solution you should gem install solargraph. If not work and get this error
ERROR: Loading command: install (ArgumentError)
unknown encoding name - CP720
ERROR: While executing gem ... (NoMethodError)
undefined method "invoke_with_build_args" for nil:NilClass
Try to execute by administrator in CMD
chcp 1252
Then try to install gem again
Enjoy!
Try executing
solargraph -v
from the VS Code terminal.
If that gives an error try
gem install bundler:1.17.3
I was getting errors with every keystroke similar to:
[Error - 6:08:49 PM] Request textDocument/completion failed.
Message: [ArgumentError] wrong number of arguments (given 1, expected 0)
Code: -32603
I'm using VSCodium, I changed a configuration in order to install "official" extensions. I re-installed all extensions, including Solargraph, that's when this started happening.
In the end, restarting editor via Developer: Reload Window fixed it.

cannot load such file -- 2.2/gherkin_lexer_en, how to fix?

I need a little help. How do I resolve this problem?
When I call cucumber I get the following error:
*** WARNING: You must use ANSICON 1.31 or higher (https://github.com/adoxa/ansic
on/) to get coloured output on Windows
WARNING: cannot load such file -- 2.2/gherkin_lexer_en
Couldn't load 2.2/gherkin_lexer_en
The $LOAD_PATH was:
lib
C:/Ruby22/lib/ruby/gems/2.2.0/gems/cucumber-1.3.19/bin/../lib
C:/Ruby22/lib/ruby/gems/2.2.0/gems/builder-3.2.2/lib
C:/Ruby22/lib/ruby/gems/2.2.0/gems/diff-lcs-1.2.5/lib
C:/Ruby22/lib/ruby/gems/2.2.0/gems/multi_json-1.11.0/lib
C:/Ruby22/lib/ruby/gems/2.2.0/gems/gherkin-2.12.2-x86-mingw32/lib
[...]
System:
Windows 8.1 x64
Ruby 2.2.1 installer
I got answer:
https://github.com/cucumber/cucumber/issues/830#issuecomment-90837546
I'm afraid Cucumber on Windows/Ruby requires ruby 2.0.0 (x86). The
reason is that the gherkin gem doesn't yet ship with compiled binaries
for more recent versions or Ruby, and not for x64.
We're working on a Gherkin3 which will address this issue. See this
post for background. I cannot give you an ETA, but it's at least a few
months away.
I download Ruby 2.0 x86 from http://rubyinstaller.org/downloads/
Install exe
Command in cmd: gem install calabash-android
ERROR: Error installing calabash-android:
The 'json' native gem requires installed build tools.
Download from http://rubyinstaller.org/downloads/ DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe
Extract DevKit to path C:\Ruby200\DevKit
Run cd C:\Ruby200\DevKit
Run ruby dk.rb init
Run ruby dk.rb review
Run ruby dk.rb install
And again use command gem install calabash-android
I have simply solved by removing Gherkin and reinstalling it by bundle install
gem uninstall gherkin
>> select all
bundle install
This problem looks like this issue. Maybe you can resolve by following comments in it. (y)
sanjaykumar5115 commented,
my probelm have been solved after uninstalling gherkin and installing gherkin-2.12.1-x86-mingw32

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

Could not find gem 'rubytree (~> 0.5.2) ruby' while installing ChiliProject on Debian

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?

error installing padrino-cache gem on windows xp, ruby 1.9.2p180 and devkit

gem update padrino-cache
Updating installed gems
Updating padrino-cache
ERROR: While executing gem ... (Errno::EINVAL)
Invalid argument - C:/Ruby192/lib/ruby/gems/1.9.1/gems/padrino-cache-0.9.25/test/tmp/#<class:0x0000010084e5a8>
ruby -v
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
Any idea on how to fix this?
Thank you!
The problem is the gem and how it's specification (manifest) was generated.
You can see the gem contents doing gem spec padrino-cache -v 0.9.25 files
You will see something like this:
- test/tmp/#<class:0x108b3b4e8>/cache/%2Ffoo
- test/tmp/#<class:0x108b3b588>/cache/%2Ffoo
- test/tmp/#<class:0x108b3b718>/cache/%2Ffoo
- test/tmp/#<class:0x108b46640>/cache/test
- test/tmp/#<class:0x108b5fdc0>/cache/test
- test/tmp/#<class:0x108b60c98>/cache/bar
- test/tmp/#<class:0x108b60c98>/cache/foo
- test/tmp/#<class:0x108b61b20>/cache/test
The files included in the gem contains colons, which is used on Windows to indicate drive letters and are not allowed as part of file name.
I will recommend report this to Padrino Framework bug tracker:
https://github.com/padrino/padrino-framework/issues
This has been fixed in hotfix release 0.9.26. Read more here: http://www.padrinorb.com/blog/padrino-0-9-26-hotfix-release

Resources