开发者

Starting Rails app on Windows with latest version of Ruby

开发者 https://www.devze.com 2023-02-16 15:23 出处:网络
Trying to start an app developed on Mac and hosted on Github, now trying to start tha开发者_运维技巧t application on Windows Vista.

Trying to start an app developed on Mac and hosted on Github, now trying to start tha开发者_运维技巧t application on Windows Vista.

Ruby Version: 1.9.2-p136 Installed Dev Kit Installed MySQL Gem Gem Version: 1.5.2 Also did 'bundle install'

Getting the following

$ rails server
c:/Ruby192/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't parse YAML at line 1
83 column 9 (Psych::SyntaxError)
        from c:/Ruby192/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'
        from c:/Ruby192/lib/ruby/1.9.1/psych.rb:119:in `parse'
        from c:/Ruby192/lib/ruby/1.9.1/psych.rb:106:in `load'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/RedCloth-4.2.3/lib/redcloth/for
matters/latex.rb:6:in `<module:LATEX>'

Researching for the error message on google, found the following http://redmine.ruby-lang.org/issues/4301

Please help in starting this application


Seems your Rails application is trying to open and parse a YAML file, which is normally used for configuration.

A parsing error could be generated due an incorrect encoding inside one of these files.

Reading RedCloth source code that triggers this seems that latex_entities.yml is the culprit.

What you can try to do is update to latest version of RedCloth (4.2.3 seems a bit old) and 4.2.7 is the latest one.

You can also try downloading the above mentioned file and using a IRB console:

require 'psych'
require 'yaml'
YAML.load_file "latex_entities.yml"

Above works for latest (4.2.7) but not with 4.2.3

Hope that helps.


If the application is built with rails 1.x to rails 2.x is better you use InstantRails which can be downloaded from rubyforge.org. But if it is built with rails 3.x i advice you use rails installer. This are the two best platforms that can make any open source application run on windows. Hope this helps you

0

精彩评论

暂无评论...
验证码 换一张
取 消