我是ruby的初学者,想要安装和GUI工具包。所以我在网上冲浪,发现shoes是一个工具包,所以我下载了".install“文件,它不能工作,上面写着一些权限错误,然后我下载了旧版本,它是".run”格式的,也不能工作,所以当我尝试下载时,我发现了鞋子的宝石,我得到了下面的ruby版本。我从git上下载了这双鞋,但还是遇到了一些错误。
root@Drona:/home/naren/shoes4# gem install bundler && bundle install
Successfully installed bundler-1.10.5
1 gem installed
Installing ri documentation for bundler-1.10.5...
Installing RDoc documentation for bundler-1.10.5...
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all
non-root users on this machine.
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies....
Using rake 10.4.2
Using addressable 2.3.8
Using after_do 0.3.1
Using ast 2.0.0
Using parser 2.2.2.6
Using astrolabe 1.3.0
Using benchmark-ips 2.2.0
Using bouncy-castle-java 1.5.0147
Using docile 1.1.5
Installing json 1.8.3 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.8.3 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.上面是终端输出。安装的Ruby版本为:
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]有人帮助我们解决这个安装,如果我做了任何错误的鞋安装,然后让我知道
发布于 2015-07-11 15:39:44
从您的终端目录看,您似乎正在尝试在Ruby1.9.3上安装shoes4。要安装shoes4,您需要JRuby和JDK -请按照in the readme的说明进行操作
由于它的构建方式,Shoes 3不能通过gem install安装。对于Shoes 3,你需要安装脚本,我推荐合适的Shoes 3.2版本from this page。如果此操作失败并出现错误,请让我们知道错误,以便我们提供帮助:)
发布于 2015-07-10 03:24:43
你应该使用gem程序来安装鞋子。如果在命令行中输入gem install shoes,就应该没问题。
要在应用程序中使用它,您需要创建一个Gemfile并在文件夹中运行Bundle install
https://stackoverflow.com/questions/31319588
复制相似问题