我尝试使用git push heroku master -f命令将我的 Rails 应用程序推送到 Heroku ,我得到了这个:
Total 0 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.0.0
remote: -----> Installing dependencies using 1.9.7
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: You are trying to install in deployment mode after changing
remote: your Gemfile. Run `bundle install` elsewhere and …Run Code Online (Sandbox Code Playgroud) 我想在我的 Ruby 项目中使用托管的私有 gem。这个 gem 托管在 GitLab 上。
因此,我需要有关在 Ruby Gemfile 中添加哪些内容来“导入”这个私有托管 gem 的帮助。
我可以使用 GitHub 或 Gemfury 中的私有 gem,但需要 GitLab 方面的帮助。
我已经mongify从原始来源安装了一个gem:https :
//github.com/anlek/mongify
然后我想从 fork 安装更新的版本(尚未被原始来源接受,但它有我需要的更新),
分叉链接:https : //github.com/yuvalkarmi/mongify
我应该怎么做才能mongify从 fork(而不是原始来源)更新我的设备?
谢谢
尝试在从远程存储库克隆的 rails 应用程序中安装 gem 时遇到多个错误,这是错误的屏幕截图,知道我仍然是 RoR 初级,知道我尝试了很多答案但没有任何效果
elta3lab@elta3lab-Inspiron-N5110:~/raye7-api$ bundle install
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32`.
Fetching gem metadata from http://rubygems.org/.............
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...........................................................................
Using rake 12.3.1
Fetching concurrent-ruby 1.1.3
Your user account isn't allowed to install to the …Run Code Online (Sandbox Code Playgroud) rails server由于以下错误,我无法运行命令:
为数据库适配器指定了“sqlite3”,但未加载 gem。添加
gem 'sqlite3'到您的 Gemfile(并确保其版本为 ActiveRecord 要求的最低版本)。(宝石::加载错误)
我在 Google 中找到了几个答案(将 Sqlite3 更改为 Postgresql Rails,Ruby on Rails -“将 'gem sqlite3''添加到您的 Gemfile”,将 'gem sqlite3' 添加到您的 Gemfile ...)但这些答案都不适合我。我尝试手动更改gemfile.lock值,尝试运行bundle命令但仍然遇到相同的错误。此外,我确实sqlite3在我的gemfile下属:development, :test小组中。
macOS Mojave Version 10.14.4 Betasqlite3 版本:1.4.0pg 版本:0.20PS:我使用pggem 是为了在 heroku 上使用数据库。
这是我的gemfile,请注意,其中一些gems被删除以使列表看起来更小更干净:
group :production do
# Database
gem 'pg', '~> 0.20'
gem 'rails_12factor'
end …Run Code Online (Sandbox Code Playgroud) 我是应用程序的合作者,我克隆了,并且在我的协作者的计算机上一切都运行得很好.但是,当我在我的Heroku应用程序的根目录中键入bundle exec或bundle install时,出现以下错误:
/Users/jacob/furious-ocean-6331/Gemfile:3:in `evaluate': undefined method `ruby' for # <Bundler::Dsl:0x007fcda31048c0> (NoMethodError)
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/dsl.rb:7:in `instance_eval'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/bundler1.1.4/lib/bundler/dsl.rb:7:in `evaluate'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/definition.rb:18:in `build'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler.rb:135:in `definition'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/bundler1.1.4/lib/bundler/cli.rb:220:in `install'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/bundler1.1.4/lib/bundler/vendor/thor/task.rb:22:in `run'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/vendor/thor.rb:263:in `dispatch'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/vendor/thor/base.rb:386:in `start'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/bin/bundle:13:in `<top (required)>'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/bin/bundle:19:in `load'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/bin/bundle:19:in `<main>'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/Users/jacob/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
There was an error in your Gemfile, and Bundler cannot continue.
Run Code Online (Sandbox Code Playgroud)
这是Gemfile:
source 'https://rubygems.org'
ruby '1.9.3'
gem 'rails', '3.2.2'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'nokogiri'
gem 'bcrypt-ruby', :require => 'bcrypt'
gem "json", …Run Code Online (Sandbox Code Playgroud) 我的第一个Rails项目部署,我遇到了一个问题.该项目是Rails 3.2.1,Ruby 1.9.3昨天,我获得了托管访问权限,他们使用的是Rails 2.3.3,Ruby 1.8.7
如果我决定仍在那里部署应用程序,我需要对其进行哪些更改?
具体来说,我对Gemfile的更改感兴趣.这是我当前的gemfile:
source 'https://rubygems.org'
gem 'rails', '2.3.3'#'3.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
gem 'haml-rails'
gem 'haml'
gem 'omniauth-twitter'
Run Code Online (Sandbox Code Playgroud)
我需要改变什么?如何查找旧Rails版本所需的所有依赖项和gems版本?
我正在尝试按照本指南将Rails应用程序上传到hostgator:http: //support.hostgator.com/articles/specialized-help/technical/how-do-i-start-using-ruby-on-rails 我'我在5.6点得到一个错误.当我做:
rake generate_session_store
Run Code Online (Sandbox Code Playgroud)
它说找不到gem'rack'并建议我运行bundle install.当我这样做时:
Gem::Installer:ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
*** 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}/lib
--with-make-prog …Run Code Online (Sandbox Code Playgroud) 我可以在下载openssl并执行以下命令后安装puma:
gem install -- --with-opt-dir=c:\openssl
Run Code Online (Sandbox Code Playgroud)
问题是,如果我尝试用bundle更新puma,它对此目录一无所知.
你能-- --with-opt-dir=在Rails Gemfile中指定吗?
对于多个依赖项,Gemfile的正确语法是什么?
尝试使用Capistrano时,出现错误消息:
cap aborted!
NotImplementedError: unsupported key type `ssh-ed25519'
net-ssh requires the following gems for ed25519 support:
* rbnacl (>= 3.2, < 5.0)
* rbnacl-libsodium, if your system doesn't have libsodium installed.
* bcrypt_pbkdf (>= 1.0, < 2.0)
See https://github.com/net-ssh/net-ssh/issues/478 for more information
Gem::LoadError : "can't activate rbnacl (< 5.0, >= 3.2.0), already activated rbnacl-5.0.0. Make sure all dependencies are added to Gemfile."
Run Code Online (Sandbox Code Playgroud)
我将以下内容放入我的Gemfile中:
gem 'rbnacl', '>= 3.2, < 5.0', :require => false
gem 'rbnacl-libsodium', :require => false
gem 'bcrypt_pbkdf', …Run Code Online (Sandbox Code Playgroud) gemfile ×10
ruby ×3
heroku ×2
rubygems ×2
bundle ×1
bundler ×1
capistrano ×1
gemfile.lock ×1
git ×1
git-fork ×1
gitlab ×1
installation ×1
mongify ×1
puma ×1
rack ×1