Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
8
Help us understand the problem. What is going on with this article?
@tarr1124

rubyのGemfileとbundlerの使い方メモ

More than 5 years have passed since last update.

rubyで作っているツールを配布しようと思ったんだけど、依存しているgemとか配布するためにGemfileなるものを使わないといけなかったので、そのメモ。

proxy経由でbundlerインストール。

$ gem install bundler --http-proxy=http://***:**

使いたいツールのディレクトリにいって、bundle initで初期テンプレートをつくる。

$ cd /usr/local/path/to/splunk-manager
$ bundle init
Writing new Gemfile to /usr/local/path/to/splunk-manager/Gemfile

Gemfileに必要なgemを記入(今回はversion指定しない)

$ vi Gemfile

# A sample Gemfile
source "https://rubygems.org"
gem 'splunk-sdk-ruby'
gem 'sqlite3'

# gem "rails"

proxyを指定してbundle install

$ export http_proxy=http://***:***
$ bundle install
Fetching gem metadata from https://rubygems.org/..........

入っていることを確認

$ gem list

*** LOCAL GEMS ***

bundler (1.6.3)
minitest (1.6.0)
rake (10.3.2, 0.8.7)
rdoc (2.5.8)
splunk-sdk-ruby (1.0.3)
sqlite3 (1.3.9)

このGemfileをgitに上げとけば良いのか

8
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
tarr1124
plaid
CXプラットフォーム「KARTE」の開発・運営、EC特化型メディア「Shopping Tribe」の企画・運営、CX特化型メディア「XD(クロスディー)」の企画・運営

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
8
Help us understand the problem. What is going on with this article?