質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Cloud9

Cloud9は、クラウドからのプログラミングが可能になるWebサービス。IDEとしての機能が搭載されており、GitHubやHerokuなど他ツールとの連携も可能です。ブラウザ上で動くため、デバイスに関係なく開発環境を準備できます。

Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

RSpec

RSpecはRuby用のBDD(behaviour-driven development)フレームワークです。

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

Q&A

解決済

1回答

1064閲覧

AWS(Amazon) Cloud9でのChrome環境構築

yuki0920

総合スコア31

Cloud9

Cloud9は、クラウドからのプログラミングが可能になるWebサービス。IDEとしての機能が搭載されており、GitHubやHerokuなど他ツールとの連携も可能です。ブラウザ上で動くため、デバイスに関係なく開発環境を準備できます。

Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

RSpec

RSpecはRuby用のBDD(behaviour-driven development)フレームワークです。

AWS(Amazon Web Services)

Amazon Web Services (AWS)は、仮想空間を機軸とした、クラスター状のコンピュータ・ネットワーク・データベース・ストーレッジ・サポートツールをAWSというインフラから提供する商用サービスです。

0グッド

1クリップ

投稿2019/02/23 11:24

#前提・実現したいこと
AWS(Amazon) Cloud9でのChrome環境構築方法について教えていただきたいです。

現在、『現場で使える Ruby on Rails 5速習実践ガイド』をAWS(Amazon) Cloud9で学習中です。
Chapter5「テストをはじめよう」にてRspecによるテスト環境を構築する事が目的です。

#エラー内容
まず、テキスト通りにRpecを実行したところ下記のエラーコードが表示され、テストが失敗しました。
(テキストでは、ローカル環境で実施しています。)

Failures: 1) タスク管理機能 一覧表示機能 ユーザーAがログインしているとき ユーザーAが作成したタスクが表示される Got 0 failures and 2 other errors: 1.1) Failure/Error: visit login_path Selenium::WebDriver::Error::UnknownError: unknown error: cannot find Chrome binary (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.14.88-72.76.amzn1.x86_64 x86_64)
1.2) Failure/Error: e = error Selenium::WebDriver::Error::UnknownError: unknown error: cannot find Chrome binary (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.14.88-72.76.amzn1.x86_64 x86_64)

#試した事

エラーコードを調べる中で、AWS(Cloud9)上にChrome環境がないためだとわかりました。具体的には下記の記事を参考にしました。

AWS(Amazon) Cloud9環境でHeadless Chromeを使う
AWS Cloud9でCapybara+Selenium+Chrome設定時のエラーとその対処法について[ Everyday Rails 6章 ]

INSTALLING GOOGLE CHROME ON CENTOS, AMAZON LINUX, OR RHEL

そこで、

curl https://intoli.com/install-google-chrome.sh | bash

を実行したところ、下記のエラーコードが表示されて、行き詰ってしまいました。

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 9526 100 9526 0 0 6746 0 0:00:01 0:00:01 --:--:-- 6746 Working in /tmp/google-chrome-installation /tmp/google-chrome-installation /home/ec2-user/environment/genba_app/taskleaf Configuring the Google Chrome repo in /etc/yum.repos.d/google-chrome.repo Loaded plugins: priorities, update-motd, upgrade-helper amzn-main | 2.1 kB 00:00:00 amzn-updates | 2.5 kB 00:00:00 google-chrome | 1.3 kB 00:00:00 1060 packages excluded due to repository priority protections Package wget-1.18-4.29.amzn1.x86_64 already installed and latest version Nothing to do --2019-02-23 09:57:52-- https://dl.google.com/linux/linux_signing_key.pub Resolving dl.google.com (dl.google.com)... 74.125.200.91, 74.125.200.93, 74.125.200.136, ... Connecting to dl.google.com (dl.google.com)|74.125.200.91|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 8038 (7.8K) [application/octet-stream] Saving to: ‘linux_signing_key.pub’ linux_signing_key.pub 100%[========================================>] 7.85K --.-KB/s in 0s 2019-02-23 09:57:53 (79.6 MB/s) - ‘linux_signing_key.pub’ saved [8038/8038] Attempting a direction installation with yum. Loaded plugins: priorities, update-motd, upgrade-helper 1060 packages excluded due to repository priority protections Resolving Dependencies --> Running transaction check ---> Package google-chrome-stable.x86_64 0:72.0.3626.119-1 will be installed 中略 make[1]: Leaving directory `/tmp/google-chrome-installation/patchelf-0.9/src' Making all in tests make[1]: Entering directory `/tmp/google-chrome-installation/patchelf-0.9/tests' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/tmp/google-chrome-installation/patchelf-0.9/tests' make[1]: Entering directory `/tmp/google-chrome-installation/patchelf-0.9' make[1]: Nothing to be done for `all-am'. make[1]: Leaving directory `/tmp/google-chrome-installation/patchelf-0.9' stat: No such file or directory stat: No such file or directory sed: can't read /opt/google/chrome/google-chrome: No such file or directory Attempted experimental patching of Chrome to use a relocated glibc version. bash: line 219: google-chrome-stable: command not found Installation has failed. Please email contact@intoli.com with the details of your operating system. If you're using using AWS, please include the AMI identifier for the instance.

最後の方の「Attempted experimental patching of Chrome to use a relocated glibc version.」より
試験的なバッチが適用されているため、インストールできないとのこと。

つまりは、最新バージョンではないとのことでしょうか。

ご存知の方、教えていただければ位幸いです。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

takahashim

2019/03/01 13:33

長いかもしれませんが、「中略」のどこかでエラーが起きてると思われるので、省略しないほうが良いかと思いました。
yuki0920

2019/03/02 00:22

「追記・修正依頼」をいただきありがとうございます。 エラー文を表示するために、 以前と同様のコード 「curl https://intoli.com/install-google-chrome.sh | bash」を打ち込んだところ、 「Successfully installed google-chrome-stable, Google Chrome 72.0.3626.121 .」と表示され、インストールすることができました。 再確認をするきっかけを作ってくださり、ありがとうございました!!
takahashim

2019/03/02 03:35

そうだったんですね、良かったです!
guest

回答1

0

自己解決

質問投稿から1週間後に、

curl

1

を打ち込んだところ、
「Successfully installed google-chrome-stable, Google Chrome 72.0.3626.121 .」と表示され、インストールすることができました!

投稿2019/03/16 12:03

yuki0920

総合スコア31

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問