Tag: rbenv

更新到ruby 2.1.4后Rails服务器没有运行

我使用rails 4.1.7和ruby 2.0.0并开发了一个应用程序。 最近升级到ruby 2.1.4并使用rbenv将其设置为“Local”设置。 现在做完“gem安装导轨”后,一切安装得很好。 问题是现在,如果我尝试运行服务器,我收到错误“无法在任何源代码中找到rake-10.4.0运行bundle install以安装缺少的gem。” bundle show rake显示它安装在“bundle show rake /Library/Ruby/Gems/2.0.0/gems/rake-10.4.0”下 这不应该在2.1.4之下吗?

rake退出状态:139

我关注https://gorails.com/deploy/ubuntu/16.04 我正在运行:“捆绑exec cap生产部署”并收到以下错误: 01 $HOME/.rbenv/bin/rbenv exec bundle install –path /home/deploy/deploy_test1/shared/bundle –without development test –deployment –q… ✔ 01 deploy@107.170.84.18 3.251s 00:21 deploy:assets:precompile 01 $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile 01 /home/deploy/deploy_test1/shared/bundle/ruby/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:121: w… 01 /home/deploy/deploy_test1/shared/bundle/ruby/2.4.0/gems/activesupport-4.2.4/lib/active_support/core_ext/numeric/conversions.rb:121: w… 01 bash: line 1: 23934 Segmentation fault (core dumped) $HOME/.rbenv/bin/rbenv exec bundle exec rake assets:precompile (Backtrace restricted to imported tasks) cap […]

BUG Segmentation fault ruby​​ 2.0.0p481(2014-05-08修订版45883)x86_64-darwin13.2.0

尝试运行rails s或rails c时收到错误。 我最近通过自制软件和rbenv安装了ruby和rails。 当我运行rails new project ,应用程序已成功创建。 然后我在相应的目录中进行bundle install ,当我运行rails s或rails c时,一切都顺利更新。 出现以下错误: |14:48:23| ~ rails c /Users/jona/.rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/ext/parser.bundle: [BUG] Segmentation fault ruby 2.0.0p481 (2014-05-08 revision 45883) [x86_64-darwin13.2.0] — Crash Report log information ——————————————– See Crash Report log file under the one of following: * ~/Library/Logs/CrashReporter * /Library/Logs/CrashReporter * ~/Library/Logs/DiagnosticReports * /Library/Logs/DiagnosticReports the more detail […]

Errno :: EACCES:运行Bundle Install时,权限被拒绝@ rb_sysopen错误

当我运行Bundle Install时,我收到以下错误: mark$ bundle install Fetching gem metadata from https://rubygems.org/……….. Fetching version metadata from https://rubygems.org/… Fetching dependency metadata from https://rubygems.org/.. Resolving dependencies… Using builder 3.2.2 Using ffi 1.9.14 Using gherkin 4.0.0 Using cucumber-wire 0.0.1 Using diff-lcs 1.2.5 Using multi_json 1.11.2 Using multi_test 0.1.2 Using rubyzip 1.2.0 Using websocket 1.2.3 Using bundler 1.11.2 Using childprocess 0.5.9 […]

为什么我需要在我的路径中添加〜/ .rbenv / bin?

我读了“ rbenv无法更改全局ruby版本 ”,我需要将~/.rbenv/bin添加到我的PATH以使rbenv工作。 它也在文档中提到但该目录不存在,如下所示: ➜ ~ ls -a ~/.rbenv/ . .. plugins shims version versions 那么为什么我需要在我的路径中添加一个不存在的目录,以便rbenv工作? 编辑: @theTinMan,我尝试卸载并重新安装,但我仍然没有〜/ .rbenv / bin路径。 您在文档中看到它应该在哪里? ➜ ~/D/w/t/underline-test rbenv –version rbenv 1.0.0 ➜ ~/D/w/t/underline-test which rbenv rbenv () { local command command=”$1″ if [ “$#” -gt 0 ] then shift fi case “$command” in (rehash | shell) eval “$(rbenv […]

C编译器无法在Mac OS Mountain Lion上创建可执行文件

我几乎每个页面都经历过,所有提示都无法解决问题。 我正在运行Mountain Lion我有Xcode,所有最新的开发人员工具都是最新的GCC和一切。 我正在尝试设置rbenv和ruby-build。 一切似乎都有效,但是当我去安装一个版本的ruby时,它说c编译器不起作用,并且它无法创建可执行文件。 日志的确切最后一行: checking for gawk… no checking for mawk… no checking for nawk… no checking for awk… awk checking whether make sets $(MAKE)… yes checking for gcc… /usr/bin/gcc-4.2 checking whether the C compiler works… no configure: error: in `/var/folders/zr/gv4jcc_122sfrtpfj5g9prc00000gn/T/ruby-build.20130106144331.1477/yaml-0.1.4′: configure: error: C compiler cannot create executables 我很难过。 该日志包含: configure:3265: /usr/bin/gcc-4.2 -I’/Volumes/Macintosh […]

vendor / bundle和ruby版本

我想知道我是否使用rbenv和bundler做错了。 我正在使用rbenv和ruby 2.1.2,就像这样 rbenv versions system * 2.1.2 (set by /home/deploy/cp/repo/.ruby-version) 我跑 bundle install –deployment –without=development,test –path=vendor/bundle 来自/home/deploy/cp 但得到 vendor/bundle/ruby/2.1.0 用我所有的gem创造。 有没有一个版本方案,我不知道捆绑,或者我应该看到一个 /home/deploy/cp/repo/vendor/bundle/ruby/2.1.2 DIR?

使用rbenv install会引发错误

我正在使用Homebrew rbenv。 brew doctor出来很好。 rbenv install 2.0.0-p451给出以下错误消息: user$ rbenv install 2.0.0-p451 Downloading ruby-2.0.0-p451.tar.gz… -> http://dqw8nmjcqpjn7.cloudfront.net/9227787a9636551f1749ee8394b5ffe5 Installing ruby-2.0.0-p451… BUILD FAILED Inspect or clean up the working tree at /var/folders/4h/ty8nj6c144b5cmhcrt0hd3cw0000gn/T/ruby-build.20140501101240.6245 Results logged to /var/folders/4h/ty8nj6c144b5cmhcrt0hd3cw0000gn/T/ruby-build.20140501101240.6245.log Last 10 log lines: ld: warning: directory not found for option ‘-L/usr/local/var/rbenv/versions/2.0.0-p451/lib’ installing default openssl libraries 1 warning generated. linking shared-object date_core.bundle ld: […]

使用./configure –with-gcc = clang在Xcode 4.2上使用Lion构建Ruby 1.9.3

我的环境:使用Xcode 4.2.1的Mac OS X v10.7.2 我正在尝试使用Xcode 4.2.1在Lion上构建ruby 1.9.3。 我理解Xcode 4.2.1附带的基于llvm的gcc编译器存在问题。 但我正试图通过遵循这些说明来解决这个问题, http://goo.gl/Sc39g 。 我能够走得更远,但后来遇到了这两个问题: #error请在编译标志中添加-D_FILE_OFFSET_BITS = 64! 致命错误:找不到’sys / statfs.h’文件 完整的配置输出在这里: http : //cl.ly/2q2G3p3r3S133i0U1i1e (错误一直在底部) 请指教。 提前致谢。 PS我已经阅读了类似/相关问题的列表,但似乎没有人解决这两个特定的错误,或者我错过了它们,因为我的眼睛开始从我尝试使这个构建工作的所有事情上釉。 如果这个问题已经得到解答,请指出我的答案,并接受我的重复道歉。

为什么不安装nokogiri?

我有一个时间在Ubuntu 12.04上安装Nokogiri的魔鬼。 我用rbenv。 $ gem install nokogiri -v ‘1.6.1’ ERROR: While executing gem … (Errno::EACCES) Permission denied – /home/deploy/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.1/.autotest $ sudo gem install nokogiri -v ‘1.6.1’ ERROR: Error installing nokogiri: nokogiri requires Ruby version >= 1.9.2. $ rbenv sudo gem install nokogiri -v ‘1.6.1’ Building native extensions. This could take a while… ERROR: Error installing […]