我正在为支持1.7.4的rails项目设置环境。我正在使用rvm,因此在rvm本身的帮助下继续在Mac 10.12.6(Macbook Air)上安装Jruby 1.7.4。
rvm install 1.7.4
以下是我的输出
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.12/x86_64/jruby-1.7.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Requirements installation successful.
HEAD is now at 2390d3b024 Bump for 1.7.4
Previous HEAD position was 2390d3b024... Bump for 1.7.4
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
From https://github.com/jruby/jruby
* branch master -> FETCH_HEAD
Already up-to-date.
git checkout 1.7.4
Copying from repo to src path...
jruby-1.7.4 - #ant jar.......
Error running '__rvm_ant jar',
please read /Users/solid/.rvm/log/1506220984_jruby-1.7.4/ant.jar.log
如果我尝试安装任何其他版本的ruby,例如2.4.1或2.0.0,它可以工作。 以下是ant.jar.log文件的内容
[2017-09-24 08:13:04] __rvm_ant
__rvm_ant ()
{
\ant "$@" || return $?
}
current path: /Users/solid/.rvm/src/jruby-1.7.4
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/solid/.rvm/bin
command(2): __rvm_ant jar
++ ant jar
Buildfile: /Users/solid/.rvm/src/jruby-1.7.4/build.xml
init:
prepare-bin-jruby:
jar:
init:
create-dirs:
[mkdir] Created dir: /Users/solid/.rvm/src/jruby-1.7.4/build
[mkdir] Created dir: /Users/solid/.rvm/src/jruby-1.7.4/build/classes
[mkdir] Created dir: /Users/solid/.rvm/src/jruby-1.7.4/build/classes/jruby
[mkdir] Created dir: /Users/solid/.rvm/src/jruby-1.7.4/build/classes/test
[mkdir] Created dir: /Users/solid/.rvm/src/jruby-1.7.4/build/test-results
[mkdir] Created dir: /Users/solid/.rvm/src/jruby-1.7.4/build/test-results/html
[mkdir] Created dir: /Users/solid/.rvm/src/jruby-1.7.4/docs/api
copy-resources:
[copy] Copying 45 files to /Users/solid/.rvm/src/jruby-1.7.4/build/classes/jruby
copy-bc-resources:
[copy] Copying 2 files to /Users/solid/.rvm/src/jruby-1.7.4/lib/ruby/shared
update-constants:
[echo] Updating Constants.java
[echo] ...using git revision = 2390d3b024, tzdata = 2012j
[copy] Warning: Could not find file /Users/solid/.rvm/src/jruby-1.7.4/build/src_gen/org/jruby/runtime/Constants.java to copy.
[copy] Copying 1 file to /Users/solid/.rvm/src/jruby-1.7.4/build/src_gen/org/jruby/runtime
_uc_internal_:
[copy] Copying 1 file to /Users/solid/.rvm/src/jruby-1.7.4/build/src_gen/org/jruby/runtime
[javac] Compiling 1 source file to /Users/solid/.rvm/src/jruby-1.7.4/build/classes/jruby
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] warning: [options] source value 1.6 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.6 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] 4 warnings
prepare:
compile-annotation-binder:
[javac] Compiling 18 source files to /Users/solid/.rvm/src/jruby-1.7.4/build/classes/jruby
[javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
[javac] warning: [options] source value 1.6 is obsolete and will be removed in a future release
[javac] warning: [options] target value 1.6 is obsolete and will be removed in a future release
[javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
[javac] Note: /Users/solid/.rvm/src/jruby-1.7.4/src/org/jruby/util/CodegenUtils.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 4 warnings
compile-jruby:
[javac] Compiling 1395 source files to /Users/solid/.rvm/src/jruby-1.7.4/build/classes/jruby
[javac] -Xbootclasspath/p is no longer a supported option.
[javac] Error: Could not create the Java Virtual Machine.
[javac] Error: A fatal exception has occurred. Program will exit.
BUILD FAILED
/Users/solid/.rvm/src/jruby-1.7.4/build.xml:636: The following error occurred while executing this line:
/Users/solid/.rvm/src/jruby-1.7.4/build.xml:289: Compile failed; see the compiler error output for details.
Total time: 4 seconds
++ return 1
如果您需要有关设置/环境的任何其他信息,请与我们联系!
感谢您的帮助!