无法安装" saas-rails#34; Windows 7上的宝石

时间:2014-01-07 19:07:22

标签: ruby-on-rails window sass

我在Windows 7计算机上使用http://railsinstaller.org/安装了Rails。 我有mysql2 gem的问题,但它已经通过下载mysql C连接器并使用自定义键解决了:

C:\Users\lenovo>gem install mysql2 -- --with-mysql-dir=c:\mysql-connector-c-6.1.
3-win32

目前我遇到了这个错误:

C:\Dropbox\xcams\ror>ruby script\rails
←[31mCould not find gem 'sass-rails (~> 3.2.3) x86-mingw32' in the gems availabl
e on this machine.←[0m
←[33mRun `bundle install` to install missing gems.←[0m

如果我重新安装gem没有错误:

C:\Dropbox\xcams\ror>gem install "sass-rails"
Successfully installed sass-rails-4.0.1
1 gem installed
Installing ri documentation for sass-rails-4.0.1...
Installing RDoc documentation for sass-rails-4.0.1...

检查列表中的gem:

C:\Dropbox\xcams\ror>gem list | findstr sass
sass (3.2.13)
sass-rails (4.0.1)

尝试开始。同样的错误:

C:\Dropbox\xcams\ror>ruby script\rails
←[31mCould not find gem 'sass-rails (~> 3.2.3) x86-mingw32' in the gems availabl
e on this machine.←[0m
←[33mRun `bundle install` to install missing gems.←[0m

如何在winodws上正确安装此gem? 我的环境:

C:\Users\lenovo>ruby -v
ruby 1.9.3p484 (2013-11-22) [i386-mingw32]

C:\Users\lenovo>gem -v
1.8.28

C:\Users\lenovo>rails -v
Rails 4.0.2

2 个答案:

答案 0 :(得分:0)

请注意不同的版本。尝试强制在Gemfile上安装的版本:

  `gem "sass-rails", "4.0.1"`

答案 1 :(得分:0)

问题在于我的IDE(Intellij Idea 13) 当我从控制台生成RoR应用程序时,一切正常。