linux新手。通过rvm安装Ruby 2.0和rails 4.0。在我的笔记本电脑上使用了linux ubuntu,但在我的工作电脑上使用linux openSUSE时出现了问题。
安装rvm、ruby和rails。创建了一个rails应用程序,但当我运行捆绑包安装时,我得到了这个:
**Errno::EACCES: Permission denied - /home/alf/.rvm/gems/ruby-2.0.0-p247/gems/sqlite3-1.3.8/API_CHANGES.rdoc
An error occurred while installing sqlite3 (1.3.8), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.8'` succeeds before bundling.**
在运行捆绑包安装时也得到了这个:
**Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/alf/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** 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. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib64
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/alf/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/
--enable-local
--disable-local
Gem files will remain installed in /home/alf/.bundler/tmp/10121/gems/sqlite3-1.3.8 for inspection.
Results logged to /home/alf/.bundler/tmp/10121/gems/sqlite3-1.3.8/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.8), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.8'` succeeds before bundling.**
我安装了sqlite3,但不知道它是否安装在本地某个地方。我是linux和openSUSE的新手。请帮帮我。
当我运行geminstallsqlite3-v"1.3.8"时,我得到:
**ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /home/alf/.rvm/gems/ruby-2.0.0-p247/gems/sqlite3-1.3.8/API_CHANGES.rdoc**
这让我抓狂,谷歌却找不到一个有效的解决方案。
我在Ubuntu上遇到了同样的错误,试图启动一个新的Rails项目。在这种情况下,sqlite3.h is missing
意味着缺少libsqlite3dev(我是Ubuntu和Sqlite3的新手)。答案就在这里:安装sqlite标头。
~$ sudo apt-get install sqlite3
~$ sudo apt-get install libsqlite3-dev
~$ bundle install
在那之后,rails server
对我来说很好。我在localhost上收到了欢迎加入。