可以让 Rails 4 在 Windows 上运行吗? [英] Possible to get Rails 4 working on Windows?

查看:27
本文介绍了可以让 Rails 4 在 Windows 上运行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理 Rails 4(使用候选版本)项目,现在需要与 Windows 机器上的某个人协作.然而,我什至无法打开一个基本的网页:(.即使使用 Ruby 2.0 安装 sqlite3 也很痛苦.现在,当我尝试打开一个网页时(我刚刚创建了一个虚拟的/home/index 控制器并查看),我收到此错误:

I'm working on a Rails 4 (using the release candidate) project and now need to collaborate with someone on a Windows machine. I can't even get a basic webpage to come up, however :(. It was quite a pain even installing sqlite3 using Ruby 2.0. Now, when I try to get a webpage up (I just created a dummy /home/index controller and view), I get this error:

Showing C:/Users/me/RubymineProjects/test_project/app/views/layouts/application.html.erb where line #6 raised:

  (in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/turbolinks-1.1.1/lib/assets/javascripts/turbolinks.js.coffee)

Extracted source (around line #6):
3  <head>
4    <title>TestProject</title>
5    <%= stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true %>
6    <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7    <%= csrf_meta_tags %>
8  </head>
9  <body>

Rails 4 还没有为 Windows 做好准备吗?使用 Ruby 2.0.0p195.

Is Rails 4 just not ready for Windows yet? Using Ruby 2.0.0p195.

UPDATE:根据@szines 请求,这是

UPDATE: As per @szines request, here's the webpage output for

http://localhost:3000/rails/info/properties:
Ruby version    2.0.0 (x64-mingw32)
RubyGems version    2.0.3
Rack version    1.5
Rails version   4.0.0.rc1
JavaScript Runtime  JScript
Active Record version   4.0.0.rc1
Action Pack version 4.0.0.rc1
Action Mailer version   4.0.0.rc1
Active Support version  4.0.0.rc1
Middleware  
ActionDispatch::Static
Rack::Lock
#<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x000000036b85c0>
Rack::Runtime
Rack::MethodOverride
ActionDispatch::RequestId
Rails::Rack::Logger
ActionDispatch::ShowExceptions
ActionDispatch::DebugExceptions
ActionDispatch::RemoteIp
ActionDispatch::Reloader
ActionDispatch::Callbacks
ActiveRecord::Migration::CheckPending
ActiveRecord::ConnectionAdapters::ConnectionManagement
ActiveRecord::QueryCache
ActionDispatch::Cookies
ActionDispatch::Session::CookieStore
ActionDispatch::Flash
ActionDispatch::ParamsParser
Rack::Head
Rack::ConditionalGet
Rack::ETag
Warden::Manager
Application root    C:/Users/me/RubymineProjects/test_project
Environment development
Database adapter    sqlite3
Database schema version 20130523073322

推荐答案

<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" =>真%>

将其更改为:

<%= stylesheet_link_tag "defaults", media: "all", "data-turbolinks-track" =>真%>

它应该可以工作.

如果有人能对此提供解释,那就太好了.

It will be great if someone can provide explanation for this.

更多信息:

ExecJS::RuntimeError in Users#index (RoR)

ExecJS 并且找不到 JavaScript 运行时

这篇关于可以让 Rails 4 在 Windows 上运行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆