我正在尝试运行一个Ruby on Rails项目,它的版本是2.4.1,我的系统是2.6.x。我所做的是通过Rbenv安装旧版本的Ruby,然后执行以下命令:
rbenv global 2.4.1 -> to change global Ruby version
ruby -v
ruby 2.6.5p114
rbenv global
2.4.1
所以有一些问题,因为我想使用2.4.1,但似乎不能工作。我无法启动捆绑包,因为它显示我没有安装2.4.1。
我需要一个Mac OS Catalina的解决方案,因为我在网上找到了,但没有什么工作,无法启动该项目。
我正在尝试用以下命令创建新的ruby on rails项目:
rails new . --no-ri --no-rdoc
但在执行此命令的末尾,我得到了:
run bundle install
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 4.2.6) was resolved to 4.2.6, which depends on
bundler (< 2.0, >= 1.3.0)
Current
我正在尝试在我的Mac上安装Ruby版本2.7.2 (所有更新的最新操作系统),并执行了以下操作 brew update
brew upgrade rbenv ruby-build 然后 rbenv install 2.7.2
ruby-build: definition not found: 2.7.2
See all available versions with `rbenv install --list'.
If the version you need is missing, try upgrading ruby-build:
brew update &&
当我启动终端时,我会收到这样的消息:
/usr/lib/rbenv/libexec/../completions/rbenv.bash:16: command not found: complete
~ %
其他一切看起来都很正常。当我运行tmux时,只有当我启动一个新的终端时,我才会收到消息。
这是我的~/..zshrc文件:
# load custom executable functions
for function in ~/.zsh/functions/*; do
source $function
done
# extra files in ~/.zsh/configs/pr
因此,我试图用rbenv安装ruby 2.5.0,这是我的问题:
$ rbenv install 2.5.0
ruby-build: use openssl from homebrew
Downloading ruby-2.5.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.0.tar.bz2
Installing ruby-2.5.0...
ruby-build: use readline from homebrew
BUILD FAILED (OS X 10.13.3 using ruby-buil
我刚刚从github下载了一个iOS/objective-c项目,它使用Cocoapods作为依赖项。
当我尝试在终端中使用pod install时,我收到以下错误:
Updating local specs repositories
Analyzing dependencies
[!] Xcodeproj relies on a library called `fiddle` to read and write Xcode project files. Ensure your Ruby installation includes `fiddle` and try again.
所以我使用ge
我已经使用Homebrew安装了rbenv。
$ rbenv local
2.4.0
$ rbenv global
2.4.0
$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
当我检查Rails版本时,我得到以下消息;
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your
当我进入项目文件夹并运行rails服务器时,我在Ubuntu系统上安装了RefineryCMS/Ruby。
from /home/andrea/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/rubygems.rb:252:in `bin_path'
/home/andrea/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.17.3)
我正试着在VPS上安装Chef solo我已经为Chef gem安装了Ruby并运行了安装命令,但是,当我检查Chef的版本时,它显示无法加载该文件。除了我还安装了和Ruby2.0.0作为初步步骤之外,我还跟随Railscast的主题进行了讨论。
你能确定这个错误的原因是什么吗?
root@Chef2:~# gem install chef ruby-shadow --no-ri --no-rdoc
Successfully installed chef-11.4.4
Building native extensions. This could take a while.
环境
Mac 10.12.3
Git版本2.11.1 (通过国产安装)
Git以前一直在工作,但是今天在任何git目录中执行git status时,我得到了以下错误:
sh: /Users/xxx/.zsh/bin/diff-highlight: No such file or directory
我的$PATH是:
/Users/xxx/.composer/vendor/bin:/Documents/Ruby:/usr/texbin:/Users/xxx/.rbenv/shims:/Users/xxx/.rbenv/shims:/usr/local/bin:/usr/bin:
我已经取得了一个现有的网站。集成了CMS (舒适的墨西哥沙发)。然后安装Redactor。我有能力添加内容并在localhost:3000上显示它。我也有能力上传文件。在使用内容框中的插入图像功能时,我遇到了一个问题。
我的服务器日志:
Started POST "/admin/sites/2/pages/2/null?ajax=1" for 127.0.0.1 at 2015-09-22 01:26:44 -0400
ActionController::RoutingError (No route matches [POST] "/admin/sites/2
安装了。但rbenv shell不是命令。
ationtekiMacBook-Air:~ dation$ rbenv versions
system
* 2.0.0-p247 (set by /Users/dation/.ruby-version)
dationtekiMacBook-Air:~ dation$ rbenv version
2.0.0-p247 (set by /Users/dation/.ruby-version)
dationtekiMacBook-Air:~ dation$ rbenv shell
rbenv: no such command `shell'
我的美食评论家宝石安装失败了,以下错误
Following gems were not installed:
foodcritic (3.0.3): Error installing foodcritic
ERROR: Failed to build gem native extension. current directory
/Users/dmanna/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/yajl-ruby-1.1.0/ext/yajl
/Users/dmanna/.rbenv/versions/2.5.1/bin/ruby -r
我在.zshrc和Ubuntu12.04上设置我的rbenv
并得到以下错误
Could not find tzinfo-0.3.40 in any of the sources Run捆绑包安装to install missing gems.
下面是crontab中的命令
/bin/sh -l -c 'source ~/.zshrc && cd /home/poc/projects/zeus/ && bundle exec unicorn -c /home/poc/projects/zeus/config/unicorn.rb -E productio
我想安装ruby rbenv install 2.2.1的新版本,但我收到错误消息
ruby-build: definition not found: 2.2.1
The following versions contain 2.2.1 in the name:
rbx-2.2.1
rbx-2.2.10
您能告诉我应该如何安装2.2.1版吗?
提前感谢!