我不知道如何在Ubuntu上安装最新的Ruby.
首先,我使用了默认的Ruby 1.9.3
sudo apt-get install ruby
Run Code Online (Sandbox Code Playgroud)
然后我尝试使用安装2.0版本
sudo apt-get install ruby2.0
Run Code Online (Sandbox Code Playgroud)
我的Ruby版本仍然是"ruby 1.9.3p484(2013-11-22修订版43786)[x86_64-linux])"
我该怎么办?
当我尝试将Flutter 项目构建到IOS 时,它向我显示此错误,我尝试清理并尝试更改项目目录。
Launching lib/main.dart on iPhone 12 Pro Max in debug mode... Running pod install... CocoaPods' output: ?
[!] Invalid `Podfile` file: [!] Specifying multiple `post_install` hooks is unsupported..
# from /Users/eapple/Downloads/codecanyon-IRJuYEQd-delivery-boy-for-multirestaurants-flutter-app/flutter_application/ios/Podfile:43
# -------------------------------------------
#
> post_install do |installer|
# installer.pods_project.targets.each do |target|
# -------------------------------------------
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/podfile.rb:301:in `rescue in block in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/podfile.rb:295:in `block in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/podfile.rb:50:in `instance_eval'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/podfile.rb:50:in `initialize'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/podfile.rb:293:in `new'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/podfile.rb:293:in `from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.9.1/lib/cocoapods-core/podfile.rb:259:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/config.rb:200:in `podfile'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:150:in `verify_podfile_exists!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.rb:46:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run' …Run Code Online (Sandbox Code Playgroud) Ikenna Okpala 推荐了这个.gemrc(我稍微修改了一下):
--- :详细:真实 :bulk_threshold: 1000 安装:--no-ri --no-rdoc --env-shebang :来源: - http://gems.rubyforge.org/ :基准:假 :回溯:假 更新:--no-ri --no-rdoc --env-shebang :update_sources: 真
我之前没有注意到--env-shebang。我--env-shebang在http://guides.rubygems.org/command-reference/查找了文档:
安装/更新选项: ... -E, -?-[no-]env-shebang - 重写已安装脚本上的 shebang 行以使用 /usr/bin/env
实际上,为什么这个--env-shebang选项很重要?(我从来没有用过。)
我在我的机器上安装了导轨
红宝石2.3.1
铁轨5.1.4
Ubuntu 16.04 os
在rails安装之后,当我检查rails版本rails -v
它抛出忽略"Some gems list",因为它的扩展没有构建
Ignoring nokogiri-1.8.1 because its extensions are not built. Try: gem pristine nokogiri --version 1.8.1
Ignoring bindex-0.5.0 because its extensions are not built. Try: gem pristine bindex --version 0.5.0
Ignoring byebug-9.1.0 because its extensions are not built. Try: gem pristine byebug --version 9.1.0
Ignoring curb-0.9.4 because its extensions are not built. Try: gem pristine curb --version 0.9.4
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks …Run Code Online (Sandbox Code Playgroud) ruby ×3
flutter ×1
flutter-ios ×1
install ×1
interpreter ×1
ios ×1
rubygems ×1
shebang ×1
ubuntu ×1
ubuntu-14.04 ×1