【问题标题】:Cannot install therubyracer, gcc version update on OSX Leopard?无法在 OSX Leopard 上安装 therubyracer、gcc 版本更新?
【发布时间】:2013-02-02 03:36:56
【问题描述】:

所以在使用 Rails 制作了我的第一个脚手架后,我尝试访问它创建的一些页面,并收到以下错误:

     ExecJS::RuntimeError in Users#index

     Showing /Users/Alice/Desktop/sample_app/app/views/layouts/application.html.erb where line #6 raised:

     dyld: unknown required load command 0x80000022

     (in /Users/Alice/Desktop/sample_app/app/assets/javascripts/users.js.coffee)
     Extracted source (around line #6):

     3: <head>
     4:   <title>SampleApp</title>
     5:   <%= stylesheet_link_tag    "application", :media => "all" %>
     6:   <%= javascript_include_tag "application" %>
     7:   <%= csrf_meta_tags %>
     8: </head>
     9: <body></code>

我查看了这个错误并得出结论,我需要安装 therubyracer gem。我尝试通过 gem install therubyracer 来做到这一点。

然后我得到了错误:

    ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.
    /Users/Alice/.rvm/rubies/ruby-1.9.3-p362/bin/ruby extconf.rb
    creating Makefile
    Unable to find a compiler officially supported by v8.
    It is recommended to use GCC v4.4 or higher
    Using compiler: g++
    File "./gyp-mac-tool", line 167
    fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666)
                                                               ^
    SyntaxError: invalid syntax

所以我运行 gcc -version,我看到我的版本是 i686-apple-darwin9-gcc-4.0.1 我尝试使用 MacPorts 更新我的 gcc,但我似乎根本无法让它工作......

我正在运行 OSX Leopard,我猜这是我所有悲伤的原因。
我从这里做什么?

【问题讨论】:

    标签: ruby-on-rails macos gcc osx-leopard therubyracer


    【解决方案1】:

    尝试另一个。 https://github.com/sstephenson/execjs 看看列表,这些基本上都做同样的事情。我相信你会找到一个有效的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-06-17
      • 2012-11-27
      • 2016-02-02
      • 2020-05-06
      • 1970-01-01
      • 1970-01-01
      • 2012-03-25
      • 2019-09-11
      相关资源
      最近更新 更多