I'm setting up a ruby Apache Buildr on a fresh Windows 7 machine.
I've installed Ruby, the DevKit and installed buildr via
gem install buildr
wich all ran perfect.
Until I tried to execute buildr, then I get an error.
buildr compile
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find buildr (>= 0) amongst [atoulme-Antwrap-0.7.1, builder-2.1.2, buildr-1.4.5-x86-mswin32, buildr-as3-0.2.12, diff-lcs-1.1.2,highline-1.5.1, hoe-2.3.3, json_pure-1.4.3, minitar-0.5.3, minitest-1.6.0, net-sftp-2.0.4, net-ssh-2.0.23, rake-0.8.7, rdoc-2.5.8, rjb-1.3.2-x86-mswin32-60, rspec-2.1.0, rspec-core-2.1.0,rspec-expectations-2.1.0, rspec-mocks-2.1.0, rubyforge-2.0.3, rubygems-update-1.8.4, rubyzip-0.9.4, xml-simple-1.0.12] (Gem::LoadError)
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems.rb:1182:in `gem'
from C:/Ruby192/bin/buildr:18:in `<main>'
When I list all the gems with
gem list buildr
Everything seems to match up, and this error makes no sense at all.
Any ideas?
Help would be great, I'm getting desperate now. :)
Had the same problem. I have Windows 7 x64 so installed again with gem install buildr --platform mswin64 and it worked.
I had a similar problem in the past.
My problem was the kind of installation.
I installed ruby as admin (target was c:\program files). Everything worked fine - until I installed a gem as normal user (not admin).
What happened on windows side? I have no authorization for c:\program files, the gem was installed in another directory (No, there was no error, Windows just decided to use another directory. This bug/feature is called 'Virtual Store').
In the end Ruby had problems to find the files.
My solution:
Install ruby as normal user outside c:\program files.
Maybe it is enough, when you install your gems as admin (but attention: if you have once files in your Virtual store, they are read always first.).
Installed Ruby 1.8.7 instead and it works now.
Related
I have Installed
2017.1.5 Version of Ruby
ruby-2.4.1-p111
I've made a new project and named it hello.rb. When I run it, everything works fine. However when I try to debug the project I get a prompt message
The gem debase required by the debugger is not currently installed. Would you like to install?
Error running hello. Following gems were not installed:
I've tried re-installing everything and restarting and I don't know what is the problem.
Well apparently debugger in RubyMine does require this gem. So You have multiple ways of doing this.
Assuming your File > Settings > Languages & Frameworks > Ruby SDK and Gems
contains only one ruby version and its the selected one (and the gem really isn't in the list). As halfelf said in your terminal/cmd/iterm you would simply write
gem install debase
Also you could create file called Gemfile that would have all the gems in
source 'http://rubygems.org'
gem 'debase'
and in the future any other gems you would need, Rubymine should be able to install those for you.
If you would have already installed the gem, there might be a gem installation conflict that would need to be resolved.
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
I'm a newbie to programming, with ruby/rails successfully installed on my (mac) home computer. I'm trying to get ruby 2.0.0p195 (and Rails) set up on Windows at work (Windows 7, 32bit) and I'm failing on the sqlite3 installation. I've been through most of the solutions/suggestions I can find on the web, but just can't get it to work - the frustrating thing is that it tells me it's installed, but it doesn't work:
- I've tried the knapsack installation http://www.ruby-forum.com/topic/4413168
- If I try to install --with-opt-dir=c:/sqlite3 (or any of the many variations suggested) it gives a native extension error.
- I've put the .dll file in Ruby/bin, which is also in my PATH
- I have the devkit installed
The 'gem install sqlite3' command is successful, and if I do 'gem list', sqlite3 v1.3.7 x86-mingw32 appears in the list, but if I 'require sqlite3' in IRB I get:
LoadError: cannot load such file -- sqlite3/sqlite3_native
And the mkmf log says:
find_header: checking for sqlite3.h... -------------------- no
But I've confirmed the sqlite3.h file (and the sqlite3.c, sqlite3.o, and sqlite3.h files) is in my c:\sqlite3 directory, and as noted above, I've also tried installing '--with-opt-dir'.
So next I trace the error when I 'require' sqlite to a file '\kernel_require.rb' in ruby/lib, and it references to this:
if Gem::Specification.unresolved_deps.empty? then
return gem_original_require(path)
end
I'm lost, and WAY out of my depth. At this point my only solution would be either to completely uninstall and start again, or to downgrade to ruby 1.9.x, but others seem to have sqlite3 and ruby 2.0 working so it's obviously (?) semi-stable. Help?
UPDATE: I've now tried downgrading to ruby 1.9.3, and apart from pik reverting to the most recent version of ruby every time I shut the command line, I can actually get the server to run etc. So it seems this issue is related specifically to ruby 2.0.
I am encountering the same issue, except that I don't really think that it is related to Ruby 2, but to rails 4 instead.
I have managed to install the sqlite3 gem by downloading the source, dll and exec (dll and executables need to be added to PATH accessible) and installying the gem with the follwing process:
Download:
http://www.sqlite.org/2013/sqlite-amalgamation-3071700.zip
http://www.sqlite.org/2013/sqlite-dll-win32-x86-3071700.zip
Extract and put the files in a location on your C drive or wherever you want. Then copy sqlite.dll and sqlite.def to the Ruby/bin directory.
Then you go to the DevKit directory and run msys.bat, in which you issue the following command:
gem install sqlite3 --platform=ruby -- --with-sqlite3-dir=path-to-sqlite --with-sqlite3-include=path-to-sqlite
This allowed me to install the gem successfully (using Ruby-2.0.0-p247 x86 and devkit). I validated through irb doing:
require 'sqlite3'
SQLite3::SQLITE_VERSION
I'm still trying to figure out this issue.
I get the same error message when I try to start the server or whenever I try to run the rails console.
I'd love to get this issue fixed...
I just have installed in my windows machine form railsinstaller.org.
Now earlier I have already installed in my machine Ruby2.0. So when I am trying to run the below command from the command prompt as mentioned here:
rails s
getting error as :
C:/Ruby200/lib/ruby/2.0.0/rubygems/dependency.rb:296:in `to_specs': Could not f
nd 'railties' (>= 0) among 8 total gem(s) (Gem::LoadError)
from C:/Ruby200/lib/ruby/2.0.0/rubygems/dependency.rb:307:in `to_spec'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in `g
m'
from C:/RailsInstaller/Ruby1.9.3/bin/rails:22:in `<main>'
Now if I uninstall the Ruby2.0 things are set. But I want also to be workable in my pc the latest version of Ruby,so that I can run my practice ruby programs as I could earlier. - Please instruct me ,so that I can run my Rails and only ruby programs from my Sublime Text 2 editor without impact.
Try using the installer from this site: http://rubyinstaller.org/
After it installs, install ruby by opening the command prompt and typing:
gem install rails
that should install rails and its dependancies. From there you can just run the rails command and create projects like usual.
Perhaps you should have a look at https://github.com/vertiginous/pik/ to manage different ruby versions. I think, that the main problem you got is simply, that the PATH-settings for both rails versions (1.9.3 used in railsinstaller and 2.0) are interfering.
I started a new rails application project with rubymine.
After that Rubymine ran a bundle install.
project did not succeed in running
on one project - with no mysql definition the error is
gemnotfound - could not find gem sqlite
on one project - with mysql definition the error is
gemnotfound - could not find gem mysql2
Does someone have an idea what are those ?
shouldnt bundle install brought me those?
How can I start a simple rails project using rubymine?
Is there a good tutorial with all these issues ?
Thanks you.
RubyMine may not be able to install these gems automatically as they depend on native libraries that may not be available on your system. You also need DevKit installed and working in order to install native extensions.
I suggest you to read related posts:
Cannot install mysql2 gem
Installing SQLite 3.6 On Windows 7
You can also use sqlite-ruby instead, as for the above gems you need sqlite3.dll and libmysql.dll in PATH.
Google is your friend, it's not that hard to find various installation guides.