我正在执行heroku run rake db:migrate,这是一个错误:
Gem::LoadError:加载“sqlite3”活动记录适配器时出错。少了一块宝石就靠了?sqlite3不是包的一部分。把它添加到你的Gemfile中。
Gemfile:
group :production do
gem 'pg', '~> 0.18'
end
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get
当我在heroku上部署时,我得到
An error occurred while installing sqlite3 (1.3.10), and Bundler cannot
continue.
Make sure that `gem install sqlite3 -v '1.3.10'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Detected sqlite3 gem which is not supporte
我正在尝试将我的rails应用程序部署到heroku,但在heroku日志中有以下消息:
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/connection_specification.rb:188:in rescue in spec': Specified 'sqlite3' for database adapter, but the gem is not loaded. Addgem‘sqlite3 3’‘到您的Gemfile (
这个问题不让我继续下去,我不知道我是否有可能在Heroku上部署我的Rails应用程序。
当我通过在Gemfile中使用bundle install来尝试gem 'pg'时,它会出现以下错误。
An error occurred while installing pg (0.18.2), and Bundler cannot continue.
Make sure that gem install pg -v '0.18.2' succeeds before bundling.
然而,当我尝试sudo gem install pg时,它说Successfully
我用sqlite3编写了rails应用程序,一切都很好。
然后我部署到Heroku,必须将DB更改为Postgres。让生产部署开始工作的唯一方法是,在gem文件中只包含gem pg,而不是将它放在一个:production组中。
无论如何,当我尝试按照下面的方式配置应用程序时,应用程序将不再在本地运行。我遗漏了什么?
Gem文件
group :development do
gem 'web-console', '>= 3.3.0'
gem 'sqlite3'
end
group :production do
gem '
我正在尝试将我的应用程序部署到Heroku。我删除了“sqlite3”创业板,并将以下部分添加到我的Gemfile中:
gem 'sqlite3', group: :development
group :production do
gem 'pg'
gem 'rails_12factor'
end
之后,我运行了bundle安装来更新它。然而,当我尝试做git add时,它说:
error: insufficient permission for adding an object to repository database.g
在尝试将类项目部署到heroku时,我收到以下错误:
An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.
Failed to install gems via Bundler.
Detected sqlite3 gem which is not supported on Heroku.
https:/
我对ruby on rails的开发很陌生。我目前在生成一个新的rails控制器时遇到了困难。下面是我在终端中输入的内容:
$ rails generate controller static_pages home help
以下是我收到的答复:
/usr/local/rvm/gems/ruby-2.3.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:177
:in `rescue in spec': Specified 'sqlite3
我正在更新我的gemfile以便在heroku上部署一个应用程序。这是gemfile:
group development do
gem 'sqlite3'
end
group development do
gem 'pg'
gem 'rails_12factor'
end
这就是错误:
分析Gemfile时出错:未定义的本地变量或Gemfile的方法‘`development’。Bundler无法继续。
我该如何解决这个问题呢?
我不断地得到一个
remote: An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling.
尝试部署到Heroku时出错,到目前为止我已经尝试了所有溢出问题。
这是我的gemfile
source 'https://rubygems.org
我跟随在GoDaddy域中部署了一个与Heroku一起使用的应用程序。
但是,当我检查我的url时,我会得到以下错误消息:
Heroku | No such app
There is no app configured at that hostname.
Perhaps the app owner has renamed it, or you mistyped the URL.
在我的GoDaddy“编辑区域记录”页面下,我有主机=> "www",指向=> (heroku应用程序名)“,以及TTL => "1小时”。
当我复制并粘贴指向字段的内容到ur
我尝试将我本地的Postgres db推送到我的Heroku应用程序中,按照Heroku的指南,我执行了heroku db:push,但我得到了以下错误:
leonsas@leonsas-VirtualBox:~$ heroku db:push
! Taps Load Error: cannot load such file -- sqlite3
! You may need to install or update the taps gem to use db commands.
! On most systems this will be:
!
!
可能重复:
当我的代码试图在heroku上的数据库中插入大数字(如100001857905525 )时,我会得到以下错误:
ActiveRecord::StatementInvalid (PGError: ERROR: integer out of range )
列已定义为整数。我使用sqlite3数据库。我的代码被部署到heroku。
当我在本地主机上运行时,它工作得很好。但是,只有在heroku上运行代码时,我才会得到上述错误。也许我可以通过将列定义为长整数或双列来解决这个问题。我如何在Ruby/Rails中做到这一点?
我一直在尝试将我的第一个Rails应用程序部署到Heroku来测试它,在使用手动部署选项时我收到了以下错误。仅作为背景说明,我使用操作系统“Windows 10”、RubyVersion2.1.8p440和rails 4.2.5.1创建了Rails应用程序。如果我能提供更多的信息,谢谢。我还安装了“咖啡脚本源”作为一个创业板,它可以使项目正确运行。
An error occurred while installing sqlite3 (1.3.11), and Bundler cannot
continue.
Make sure that `gem install sqli
所以我把我的应用程序部署到Heroku上,安装了gem 'pg‘并删除了sqlite。现在当我在本地或Heroku上迁移时收到此错误
Gem::LoadError: Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
我该如何解决这个问题呢?谢谢
为了在Heroku上加载我的rails 3.2.8应用程序,我放入了Gemfile:
group :development, :test do
gem 'sqlite3'
end
group :production do
gem 'pg'
end
我给了‘捆绑安装’,忘记了给'--没有生产‘,现在当我给'rails s’时,控制台给我错误:找不到铁路'..my gem..‘( gem : load error),当我给出时,Heroku给我错误: heroku run rake db:migrate..In Gemfile我只是把