AXYZdong,CSDN首发,AXYZdong原创 唯一博客更新的地址为: AXYZdong的博客 B站主页为:AXYZdong的个人主页 文章目录 踩坑之一:Windows下搭建失败,不支持therubyracer Error two Installing therubyracer with native extensions C:/RailsInsta ller/Ruby1.9.2/lib/ruby/site_ruby (Gem::I nstaller::ExtensionBuildError) 解决方法:Windows下无解,源于下面这段话,therubyracer不适用与Windows Hi, just to add a quick note: You can write gem ‘therubyracer’, :platform => :ruby in your Gemfile, so that therubyracer gem on windows 发现Windows下不支持therubyracer,果断转向Linux,开了一个Ubuntu的虚拟机。
它可以作为therubyracer 请打开Gemfile: nano Gemfile 找到以下行: # gem 'therubyracer', platforms: :ruby 并取消注释: gem 'therubyracer', platforms: :ruby 保存文件,然后运行Bundler: bundle install 我们需要禁用默认的Nginx配置。
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt install nodejs 注意如果您的Gemfile已包含therubyracer