0

So after making my first scaffold using Rails, I tried to access some of the pages it created, and got the following error:

     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>

I looked up this error and I concluded that I needed to install therubyracer gem. I tried to do this via gem install therubyracer.

Then I got the error:

    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

So I run gcc -version, and I see that my version is i686-apple-darwin9-gcc-4.0.1 I've tried to update my gcc using MacPorts, and I can't seem to make it work at all...

I'm running OSX Leopard, which I'm guessing is the cause of all my grief.
What do I do from here?

svick
  • 236,525
  • 50
  • 385
  • 514
ays0110
  • 240
  • 4
  • 18

1 Answers1

0

Try another one. https://github.com/sstephenson/execjs Look at the list, these basically all do the same thing. I'm sure you'll find one that works.

mathieugagne
  • 2,465
  • 1
  • 17
  • 18