标签: therubyracer

osx mavericks没有安装"gem install therubyracer -v'0.10.2"

尝试使用"gem install therubyracer -v'0.10.2'"在小牛上安装therubyracer但是我收到以下错误:

/Users/dennischen/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for main() in -lobjc... yes
creating Makefile

make
compiling rr.cpp
clang: warning: argument unused during compilation: '-rdynamic'
rr.cpp:48:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
1 warning generated.
compiling v8.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_array.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_callbacks.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_context.cpp
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8_date.cpp
clang: warning: argument unused …
Run Code Online (Sandbox Code Playgroud)

macos gem ruby-on-rails therubyracer osx-mavericks

90
推荐指数
5
解决办法
4万
查看次数

therubyracer - Gem :: Ext :: BuildError:错误:无法构建gem原生扩展

我正在尝试在Mavericks上安装以下gem版本

  • libv8(3.16.14.3)
  • therubyracer(0.12.1)

显然,therubyracer宝石取决于libv8.

1)安装libv8

什么是libv8?我的一些研究似乎表明它是Google Chrome使用的某种javascript库?

我在安装它时遇到了麻烦,但是这个很棒的帖子既有我的错误,也有关于如何绕过它的解释清楚的答案.

所以我安装libv8

gem install libv8 -- --with-system-v8
Run Code Online (Sandbox Code Playgroud)

这是我的理解,这安装了gem,但使用我的本地系统安装v8库而不是... gem附带的版本?无论哪种方式,它都是成功的.

2)安装therubyracer

在下一步中,我在安装therubyracergem时遇到了麻烦.我不太确定这个gem是做什么的,只是因为它是我正在尝试的rails项目的依赖项bundle install.

它给了我以下错误:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /Users/jeeves.butler/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb 
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... no
*** 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. …
Run Code Online (Sandbox Code Playgroud)

ruby gcc therubyracer libv8 osx-mavericks

73
推荐指数
6
解决办法
4万
查看次数

therubyracer安装错误

正如你在下面看到的,libv8安装得很好,但是therubyracer却没有.我正在使用Mac 10.7.4.

~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1> gem install libv8
Building native extensions.  This could take a while...
Successfully installed libv8-3.11.8.3
1 gem installed
Installing ri documentation for libv8-3.11.8.3...
Installing RDoc documentation for libv8-3.11.8.3...

~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1> gem install therubyracer
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.

        /Users/rdp/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
checking for main() in -lobjc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check …
Run Code Online (Sandbox Code Playgroud)

gem therubyracer

37
推荐指数
4
解决办法
4万
查看次数

在Mavericks上修复therubyracer/libv8(0.12.1)安装

好的,我正处于我的束缚之中.有一些类似的问题,但他们都提到了Therubyracer 0.10,他们大多认为问题可以通过升级到0.12来解决.

我有类似的问题,但是当我使用0.12时.

类似的问题

我在使用'标准'(xcode?)gcc以及来自自制软件的apple-gcc42和gcc时遇到了问题.我都试过--with-system-v8--without-system-v8,并再次,没有骰子.

这是一些日志:

从头开始…

 $ cd ~/Documents/code/website
 $ rvm gemset empty
 $ ruby -v
 ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin10.8.0]
 $ grep rubyracer Gemfile
 gem 'therubyracer', '~> 0.12.0'
 $ brew list | grep v8
 $ cat ~/.bundle/config 
 $ cat .bundle/config 
 BUNDLE_BIN: bin
 $ $CXX
 $ $CPP
 $ $CC
 $ which gcc
 /usr/bin/gcc
 $ which g++
 /usr/bin/g++
 $ g++ -v
 Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with- 
 gxx-include-dir=/usr/include/c++/4.2.1
 Apple LLVM version 5.1 (clang-503.0.38) (based …
Run Code Online (Sandbox Code Playgroud)

gcc rubygems v8 therubyracer libv8

24
推荐指数
3
解决办法
2万
查看次数

在OSX 10.11 El Capitan上安装therubyracer gem

bundle install 失败了 Make sure that `gem install therubyracer -v '0.12.1'` succeeds before bundling

gem install therubyracer -v '0.12.1' 失败,似乎与编译有关的错误

在此之前,libv8 gem存在问题,但现在由于以下SO帖子而安装.

由于El Capitan的变化,为小牛队修复红宝石的指南似乎不起作用?

ln: /usr/bin/cpp: Operation not permitted 
Run Code Online (Sandbox Code Playgroud)

bundler therubyracer osx-elcapitan

24
推荐指数
4
解决办法
2万
查看次数

宝石安装therubyracer -v'0.11.4'?

我几乎疯狂地安装了therubyracer.我知道有很多人对我有同样的问题,我也看过这些问题,但是对我来说太复杂了因为不同的情况有不同的解决方案.事实上,解决问题的方法并不好.我的问题与类似,并且有一个关于它的讨论,但是仍然没有结论.

尽管如此,克里斯S提出的一个很好的问题,但不是一个好结果.

①以下是关于我的问题的一些注意事项:

1.ruby 2.2.1p85(2015-02-26修订版49769)[x86_64-darwin15]

2.libv8 3.11.8.17带有原生扩展

②OSX El Capitan,10.11

③以下是错误消息:

ERROR:  Error installing therubyracer:
ERROR: Failed to build gem native extension.

/Users/hufeipeng/.rbenv/versions/2.2.1/bin/ruby -r ./siteconf20151026-41811-14t2l9a.rb extconf.rb

checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling accessor.cc
clang: warning: argument unused during compilation: '-rdynamic'
In file included from accessor.cc:1:
In file included from ./rr.h:4:
/usr/local/include/v8.h:353:33: error: …
Run Code Online (Sandbox Code Playgroud)

therubyracer

10
推荐指数
2
解决办法
3059
查看次数

使用less(2.2.1)引发需要therubyracer的错误(无法在windows上安装therubyracer)

我一直在努力让twitter-bootstrap-rails gem在我的windows机器上工作,并且在尝试安装'therubyracer'宝石时遇到了错误,这是一个较旧版本的较少宝石的依赖.

我认为升级到较低的2.2.1,这不依赖于therubyracer,但尽管它似乎认为我仍然需要安装therubyracer.这是我尝试启动rails服务器'rails s'时得到的错误输出.

$ rails s
[WARNING] Please install gem 'therubyracer' to use Less.
c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- v8 (LoadError)
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less/java_script/v8_context.rb:2:in `<top (required)>'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less/java_script.rb:9:in `default_context_wrapper'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less/java_script.rb:17:in `context_wrapper'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less/loader.rb:10:in `initialize'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less.rb:14:in `new'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less.rb:14:in `<module:Less>'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/less-2.2.2/lib/less.rb:9:in `<top (required)>'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
    from c:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require' …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails less twitter-bootstrap-rails therubyracer

8
推荐指数
1
解决办法
6940
查看次数

尽管安装了therubyracer和nodejs,但无法找到JavaScript运行时

我正在尝试在CentOS 5上运行Rails应用程序并继续收到此错误:

找不到JavaScript运行时.有关可用运行时的列表,请参阅https://github.com/sstephenson/execjs.(ExecJS :: RuntimeUnavailable)

我安装了NodeJS(v0.8.15)和therubyracer(libv8).

这是我的gem list:

*** LOCAL GEMS ***

actionmailer (3.2.9, 3.2.8)
actionpack (3.2.9, 3.2.8)
activemodel (3.2.9, 3.2.8)
activerecord (3.2.9, 3.2.8)
activerecord-sqlserver-adapter (3.2.10)
activeresource (3.2.9, 3.2.8)
activesupport (3.2.9, 3.2.8)
arel (3.0.2)
builder (3.1.4, 3.0.4)
bundler (1.2.3, 1.2.2)
capistrano (2.13.5)
commonjs (0.2.6)
daemon_controller (1.1.0)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.4.0)
factory_girl (4.1.0)
factory_girl_rails (4.1.0)
fastthread (1.0.7)
haml (3.1.7)
haml-rails (0.3.5)
highline (1.6.15)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.1.4, 2.1.3)
json …
Run Code Online (Sandbox Code Playgroud)

ruby ruby-on-rails node.js execjs therubyracer

8
推荐指数
1
解决办法
2316
查看次数

安装适用于Mac 10.9/Rails 3.2.11的therubyracer gem时出错

知道为什么我不能为Mac 10.9和Rails 3安装therubyracer gem吗?

Installing therubyracer (0.11.3) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/xiruki/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb 
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... yes
creating Makefile

make
compiling accessor.cc
clang: warning: argument unused during compilation: '-rdynamic'
In file included from accessor.cc:1:
./rr.h:462:14: error: no type named 'AccessorGetter' in namespace 'v8'
  inline v8::AccessorGetter accessorGetter() {return &AccessorGetter;}
         ~~~~^
./rr.h:463:14: error: no type named 'AccessorSetter' in namespace 'v8'
  inline v8::AccessorSetter accessorSetter() {return RTEST(set) ? …
Run Code Online (Sandbox Code Playgroud)

ruby ruby-on-rails therubyracer

8
推荐指数
1
解决办法
1355
查看次数

什么是therubyracer或libv8 for rails应用程序?

我正在研究一个项目,经常遇到有关therubyracer和libv8的问题,所以我决定删除它们.它似乎是唯一使用它们作为依赖的东西是较少的轨道,我想要删除无论如何.

我的主要问题是它们是什么,我是否需要它们在普通应用程序中,如果是这样,为什么?

ruby-on-rails therubyracer libv8

8
推荐指数
1
解决办法
8564
查看次数