无法运行rails服务器

时间:2014-07-24 11:54:30

标签: ruby-on-rails

我刚刚开始使用ruby on rails,在安装rails在控制台上执行许多命令之后,我尝试使用命令rails server运行rails服务器,但是收到有关不加载coffee-rails的错误,我尝试过命令gem install coffee-rails我得到了

    gem install coffee-rails
    Temporarily enhancing PATH to include DevKit...
    Building native extensions.  This could take a while...
    ERROR:  Error installing coffee-rails:
    ERROR: Failed to build gem native extension.

C:/Ruby193/bin/ruby.exe -r ./siteconf20140724-4244-v083ym.rb extconf.rb
creating Makefile

make  clean
Makefile:165: *** target pattern contains no `%'.  Stop.

make
Makefile:165: *** target pattern contains no `%'.  Stop.

make failed, exit code 2

Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.
1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/js
on-1.8.1/gem_make.out

2 个答案:

答案 0 :(得分:1)

RubyGems 2.4.1不会在Windows 1.9及更早版本的Windows上构建本机扩展。

您需要将RubyGems降级到1.8.29。 为此,请运行以下命令:

gem update --system 1.8.29

检查宝石版本:

gem -v
1.8.29

现在再次尝试你的命令:

gem install coffee-rails

参考:https://groups.google.com/forum/#!topic/rubyinstaller/k19SeJijpKU/discussion

答案 1 :(得分:0)

Take a look at this answer - 他们似乎遇到了同样的麻烦,不得不使用较旧版本的品牌。