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

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

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

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

Ruby on Rails

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

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

ImageMagick

ImageMagickとは、画像の表示や操作を行うオープンソースのソフトウェアです。プログラムはCで書かれており、GIFやJPEG、PDFなど画像ファイルフォーマット100種類以上に対応しています。

Q&A

解決済

1回答

1385閲覧

linuxbrewをインストールの方法について

c_koki

総合スコア5

Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

Ruby on Rails

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

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

ImageMagick

ImageMagickとは、画像の表示や操作を行うオープンソースのソフトウェアです。プログラムはCで書かれており、GIFやJPEG、PDFなど画像ファイルフォーマット100種類以上に対応しています。

0グッド

0クリップ

投稿2019/10/27 15:02

https://teratail.com/questions/218989

tarted POST "/information" for 60.114.58.27 at 2019-10-23 15:19:09 +0000 Cannot render console from 60.114.58.27! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255 Processing by InformationController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"b3J4JfJEXdcC4vVabTka+cKiiKOmmFmfRWYDORJJsQdQzS/RhQD+rFWiHPhoVOuP2I1R5qvdGEkFTAaDKrrA/g==", "information"=>{"title"=>"image", "description"=>"最近のです", "condition"=>"New", "image"=>[#<ActionDispatch::Http::UploadedFile:0x00007f4f81addf e0 @tempfile=#<Tempfile:/tmp/RackMultipart20191023-14645-1ftl8wu.JPG>, @original_filename="IMG_3010.JPG", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"information[image][]\"; filename=\"IMG_3010.JPG\"\r\nContent-Type: image/jpeg\r\n">]}, "commit"=>"Create Information"} Cart Load (0.1ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT ? [["id", 16], ["LIMIT", 1]] ↳ app/models/concerns/current_cart.rb:5 User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 4], ["LIMIT", 1]] ↳ vendor/bundle/ruby/2.5.0/gems/activerecord-5.2.3/lib/active_record/log_subscriber.rb:98 (0.1ms) begin transaction ↳ app/controllers/information_controller.rb:29 (0.0ms) rollback transaction ↳ app/controllers/information_controller.rb:29 Rendering information/new.html.slim within layouts/application Rendered information/_form.html.slim (9.1ms) Rendered information/new.html.slim within layouts/application (12.7ms) (0.2ms) SELECT COUNT(*) FROM "line_items" WHERE "line_items"."cart_id" = ? [["cart_id", 16]] ↳ app/helpers/application_helper.rb:3 Rendered shared/_navbar.html.slim (7.6ms) #<ActiveModel::Errors:0x00007f4f819a73d8 @base=#<Information id: nil, condition: "New", title: "image", description: "最近のです", created_at: nil, updated_at: nil, image: nil, user_id: 4>, @messages={:image=>["Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: You must have ImageMagick or GraphicsMagick installed"], :title=>[], :description=>[], :condition=>[]}, @details={:image=>[{:error=>"Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: You must have ImageMagick or GraphicsMagick installed"}]}> Completed 200 OK in 73ms (Views: 59.6ms | ActiveRecord: 0.5ms)

というエラーが出たためbrew install imagemagickかbrew install graphicsmagickをしようと考えました

test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv) test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) test -r ~/.bash_profile && echo "eval $($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile echo "eval $($(brew --prefix)/bin/brew shellenv)" >>~/.profile

回答者の方に教えていただいたこのコードを打つと500エラーが出てcss,jsが使えなくなってしまいました

https://qiita.com/tikogr/items/e19c2a2cec41a8d4d85f
このサイトにそってやれば大丈夫でしょうか?
詳しい方お願いしますmm
cloud9からvagrantに変えました、virtualbox使ってます

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

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

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

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

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

ryuii

2019/10/28 02:00

environment以下のproduction.rbに以下の記載は無いのですか?入れてみて、アセッツプリコンパイルやるとか。 config.assets.compile = true
c_koki

2019/10/28 04:08 編集

返信ありがとうございますmm git cloneとcloud9からvaargrantに環境を変えることで送っていただいとコードを実行する前の環境に戻ったのですがconfig.assets.compile = trueに変更してアセットコンパイルして送っていただいたコードを実行するという形で大丈夫でしょうか?
c_koki

2019/10/28 05:30

今config.assets.compile = falseだったのを変更しましたー
ryuii

2019/10/28 07:13

rake assets:precompile RAILS_ENV=production でアセッツプリコンパイルしても500エラーでますか?Webサーバーはなんですか?
ryuii

2019/10/28 07:15

あとは、application.jsでjquery読み込んでないとか
c_koki

2019/10/28 09:53 編集

説明不足で申し訳ないですmm 今git cloneして一番最初に送っていただいたコードを実行する前の状態の戻しましたー そのため今はbrew installができない状態です(500エラーが起きる前です) 送っていただいたコード (test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv) test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile) を実行してrake assets:precompile RAILS_ENV=productionしたら問題ないでしょうか?
ryuii

2019/10/28 10:24

yum install ImageMagick とか、apt-get install imagemagickでもImagemagic入りますよ。
c_koki

2019/10/28 14:55

vagrant@ubuntu-bionic:/vagrant/TestInformation.1$ yum install ImageMagick Command 'yum' not found, but can be installed with: apt install yum Please ask your administrator. vagrant@ubuntu-bionic:/vagrant/TestInformation.1$ apt-get install imagemagick E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? vagrant@ubuntu-bionic:/vagrant/TestInformation.1$ apt install yum E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root? って感じでできないです どうすればいいでしょうか?
ryuii

2019/10/28 14:57

Ubuntuなのですね。 sudo apt-get install Imagemagick だと思います
c_koki

2019/10/28 15:11

うまくいきましたー!!! 本当にありがとうございましたmm
ryuii

2019/10/28 15:12

それは良かったですね。
guest

回答1

0

自己解決

sudo apt-get install Imagemagick

投稿2019/10/29 00:56

c_koki

総合スコア5

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

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

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問