我是一个全新的RoR,没有太多的Web开发经验。我通常在这一点上放弃,但我需要一个RoR开发环境才能找到工作,而且我无法选择网站创建者的大脑,因为他是公司以外的人,并且明确表示他完全不熟悉Windows(他开发在Mac上,我开始明白为什么......)。这是我第一次发布这样善良......Ruby DevKit不适用于WindowsXP上的RedCloth和其他宝石
目标:能够查看本地计算机上的基于RoR的网站,最好使用预先存在的XAMMP服务器,但使用Rails服务器将罚款太。
环境: 的Windows XP XAMMP 1.7.3 红宝石9.1.2 的devkit 4.5.0。
我已经试过: 我开始使用本教程之后的方向(在Windows计算机上安装http://www.grapethinking.com/getting-rails-to-work-on-a-windows-machine-running-xampp XAMPP和Rails)。我成功完成了所有步骤,并能够创建一个Rails应用程序并查看“Welcome Aboard”页面。
我收到了一个关于他们使用的ror托管服务的heroku(http://heroku.com/)的本地副本。我按照Xampp和Rails教程的第5步中所述修改了Apache配置文件以指向站点的公用文件夹。在这一点上我去到localhost时以下消息:3000
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
11/4/2010 2:19:12 PM
Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1
我不知道如何更改Windows机器上的权限,或者这是连问题。我试图运行“轨道的”这抱怨:
Could not find RedCloth-4.2.3 in any of the sources, Try running 'bundle install'.
所以我发现这个职位它说明了我的情况(http://www.ruby-forum.com/topic/204455),这导致我下载的devkit。此时我卸载了ruby并使用正确的安装程序重新安装了它。我按照其网站上的说明安装了开发工具包(https://github.com/oneclick/rubyinstaller/wiki/Development-Kit)。
DevKit无法正常工作。 config.yml文件自动具有我安装ruby的位置(在.... xampp/ruby/Ruby192中),并且它没有抱怨地运行,除了在步骤5中测试它是否实际上使用命令“gem install rdiscount --platform =红宝石”,这将产生以下错误:
C:\RubyDevKit>gem install rdiscount --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rdiscount:
ERROR: Failed to build gem native extension.
"C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/XAMPP_Install
/xampp/ruby/Ruby192/bin/ruby.exe" extconf.rb
checking for random()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010
/XAMPP_Install/xampp/ruby/Ruby192/bin/ruby
--with-rdiscount-dir
--without-rdiscount-dir
--with-rdiscount-include
--without-rdiscount-include=${rdiscount-dir}/include
--with-rdiscount-lib
--without-rdiscount-lib=${rdiscount-dir}/lib
C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/XAMPP_Install/
xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed t
o generate an executable file. (RuntimeError)
You have to install development tools first.
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:435:in `try_link0'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:440:in `try_link'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:552:in `try_func'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:797:in `block in have_fun
c'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking
_for'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels)
in postpone'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone
'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
from C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2010/X
AMPP_Install/xampp/ruby/Ruby192/lib/ruby/1.9.1/mkmf.rb:796:in `have_func'
from extconf.rb:5:in `<main>'
Gem files will remain installed in C:/Documents and Settings/Lyla/My Documents/n
ew/XAMPP_Server_2010/XAMPP_Install/xampp/ruby/Ruby192/lib/ruby/gems/1.9.1/gems/r
discount-1.6.5 for inspection.
Results logged to C:/Documents and Settings/Lyla/My Documents/new/XAMPP_Server_2
010/XAMPP_Install/xampp/ruby/Ruby192/lib/ruby/gems/1.9.1/gems/rdiscount-1.6.5/ex
t/gem_make.out
所以它确实有‘暂时提升路径包括的devkit ......’但没有别的作品。尝试安装RedCloth时发生类似的错误。
我发现这个职位似乎很相关,但它是为获得DBD-ODBC宝石,不管它是什么,工作和解决方案似乎有些特定于: I can't get the ruby development kit working for Windows XP
我不知道他正在讨论修改fstab文件......也许这会帮助我?不幸的是我找不到fstab文件,我的devkit根文件夹中没有msys文件夹。我无法在ruby install的bin文件夹或devkit中的各个bin文件夹中找到gcc.bat,make.bat或sh.bat。
还有这个帖子(http://www.ruby-forum.com/topic/186191),它暗示了一些我不能真正遵循的东西......它也是从2009年开始的,所以我认为它可能是旧的。
帮助和谢谢!
我收到错误消息“您必须先安装开发工具。”即使它告诉了我一切,“临时增强PATH以包括DevKit ...”。事实证明,我有错误的devkit版本,我需要ruby 1.9的“tdm”devkit,而不是仅用于ruby 2.0的最新开发包。 – Ninjaxor 2013-07-04 17:19:43