fedora安装rails缺少js runtime和cannot load such file -- sqlite3/sqlite3_native解决办法
2013-10-25 18:09
375 查看
装完rails后创建应用程序:
进入创建的demo文件夹
检查安装环境
这时出现错误
解决办法:
引用两个gem:execjs和therubyracer,在应用跟目录下的GemFile中添加:
此时运行
如果提示
则执行bundle install
此问题的另一解决方法是安装nodejs:
-------------------
另外遇到的一个问题是
解决办法:
打开文件
将第二个require后面的路径改为:
'/usr/local/share/gems/gems/sqlite3-1.3.8/ext/sqlite3/sqlite3_native'
rails new demo
进入创建的demo文件夹
cd demo
检查安装环境
rake about
这时出现错误
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
解决办法:
引用两个gem:execjs和therubyracer,在应用跟目录下的GemFile中添加:
gem ‘execjs’ gem ’therubyracer‘
此时运行
rake about
如果提示
Could not find gem 'therubyracer (>= 0) ruby' in the gems available on this machine. Run `bundle install` to install missing gems.
则执行bundle install
此问题的另一解决方法是安装nodejs:
yum install nodejs
-------------------
另外遇到的一个问题是
cannot load such file -- sqlite3/sqlite3_native
解决办法:
打开文件
vi /usr/local/share/gems/gems/sqlite3-1.3.8/lib/sqlite3.rb
将第二个require后面的路径改为:
'/usr/local/share/gems/gems/sqlite3-1.3.8/ext/sqlite3/sqlite3_native'
相关文章推荐
- cannot load such file -- openssl 用gem安装rails时遭遇的错误
- Ruby on Rails 安装出现`require’: cannot load such file — openssl (LoadError)的解决方法
- CentOS下安装rails,遇到no such file to load -- zlib错误...
- Ruby on Rails安装过程中出现"no such file to load -- mkmf"错误的解决方法。
- ubuntu安装ghc遇到的问题 缺少编译库libgmp.so.3: cannot open shared object file: No such file解决方案
- 解决rails5.0 ruby2.3.1下bcryp_ext LoadError: Cannot load such file
- Ubuntu上安装gem包时报`require': cannot load such file -- openssl (LoadError)
- Centos7与Fedora24安装mysql后无法启动,提示 Unit mysql.service failed to load:No such file or directory
- Centos7与Fedora24安装mysql后无法启动,提示 Unit mysql.service failed to load:No such file or directory
- Ubuntu上安装gem包时报`require': cannot load such file -- openssl (LoadError)
- 源码安装ruby时 ERROR: Loading command: install (LoadError) cannot load such file -- zlib 解决方法
- Centos7与Fedora24安装mysql后无法启动,提示 Unit mysql.service failed to load:No such file or directory
- Rails console 不能使用,出现cannot load such file -- readline (LoadError) 的解决
- pod update, LoadError - cannot load such file -- openssl报错解决办法,pod重装
- linux 安装 VTK 提示libvtkNetCDF_cxx.so: cannot open shared object file: No such file or directory 的解决办法
- docker 安装 Error response from daemon: Cannot start container no such file or directory
- mysql-python 安装错误 fatal error C1083: Cannot open include file: 'config-win.h': No such file or direc
- 安装插件libxstl遇到的/bin/rm: cannot remove `libtoolT’: No such file or directory
- [11]缺少动态连接库.so--cannot open shared object file: No such file or directory
- Rails错误:LoadError: no such file to load – openssl 解决办法