我正在尝试在Ubuntu 16.04上安装Ruby.但是当我输入以下命令到终端时:
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
Run Code Online (Sandbox Code Playgroud)
我得到以下内容:
Downloading https://github.com/rvm/rvm/archive/1.29.1.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.29.1/1.29.1.tar.gz.asc
gpg: Signature made 19 ???, 2017 EET 10:02:47 ? using RSA key ID ********
gpg: Can't check signature: No public key
Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found. Assuming you trust Michal Papis import the mpapis public key (downloading the signatures).
GPG signature verification failed for '/home/tamer/.rvm/archives/rvm-1.29.1.tgz' - 'https://github.com/rvm/rvm/releases/download/1.29.1/1.29.1.tar.gz.asc'! Try to install GPG v2 and then …Run Code Online (Sandbox Code Playgroud) 我正在使用 Ruby-2.5.5 、 Rails 5.2.2.1 和 Activeadmin 1.4.3 开发一个项目
在 Activeadminresort显示页面上,我尝试添加一个表单来更新resort. 到目前为止我在里面添加了以下内容show do
show do
...
div do
semantic_form_for [:admin, resort], builder: ActiveAdmin::FormBuilder do |f|
f.inputs do
f.input :name
f.input :description
end
f.actions
end
end
end
Run Code Online (Sandbox Code Playgroud)
但是,我得到的只是Update Resort显示的按钮:
有什么想法如何显示输入字段吗?
我正在开发一个 Ruby on Rails 网络应用程序,我使用 Devise 作为用户/密码和 OmniAuth 使用社交媒体帐户进行身份验证。我也在使用 Nginx。
使用用户名/密码的身份验证工作完美。但是当我将 ssl 证书添加到 Nginx 时。我现在可以登录了。但是当我注销时,我在标题中收到错误消息URI::InvalidComponentError (bad component(expected scheme component): : https):并告诉我有一个异常生成:
def check_scheme(v)
if v && parser.regexp[:SCHEME] !~ v
raise InvalidComponentError,
"bad component(expected scheme component): #{v}"
end
Run Code Online (Sandbox Code Playgroud)
如何解决此问题以使所有类型的身份验证都能正常工作?
更新
在几乎每次使用 Web 应用程序重定向后,它都会抛出相同的异常。但无论如何重定向,事件用户登录。但它永远不会注销
*更新 2 *
这个问题对我的问题有更详细的描述
这个另一个问题是另一个解决问题的尝试
更新 3
当我尝试添加config.force_ssl = true到我的环境.rb文件时,我得到“找不到页面”和以下内容ssl.error.log
2018/04/13 05:05:14 [error] 7317#0: *553 connect() failed (111: Connection refused) while connecting to upstream, client: <my laptop ip>, server: …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用将其添加elasticsearch到我的Ruby on Rails网站searchkick gem。我当前使用的操作系统是Ubuntu 16.04 TLS。
我安装了elasticsearch 6.2.2,到目前为止,默认配置未更改。
当我跑步时,curl -X GET 'http://localhost:9200'我得到:
{
"name" : "viTKcuN",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "aHCpbpvoQd2sieJRWtqI7g",
"version" : {
"number" : "6.2.2",
"build_hash" : "10b1edd",
"build_date" : "2018-02-16T19:01:30.685723Z",
"build_snapshot" : false,
"lucene_version" : "7.2.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
Run Code Online (Sandbox Code Playgroud)
我想这是所需的输出。
然后gem 'searchkick', '~> 3.0',我将其添加到我的Gemfile中,然后运行bundle install并添加searchkick到我的模型中。
但是,Activity.reindex在终端中运行会导致:
Activity.reindex: command not found
Run Code Online (Sandbox Code Playgroud)
运行 …
ubuntu ×2
activeadmin ×1
devise ×1
linux ×1
nginx ×1
ruby ×1
rvm ×1
searchkick ×1
ssl ×1
ubuntu-16.04 ×1