什么被宝石安装放下?

时间:2016-01-19 19:19:05

标签: ruby rubygems

在安装gem之前,我怎么知道它会在我的系统上放置哪些文件?据我所知,几乎所有文件都以我的GEM路径结束,如public class GBLSample extends JDialog { private JPanel contentPane; private JScrollPane redSP = new JScrollPane(new RedPanel()); public static void main(String[] args) { EventQueue.invokeLater(() -> { GBLSample frame = new GBLSample(); frame.setVisible(true); }); } private class RedPanel extends JPanel { RedPanel() { setLayout(new GridBagLayout()); setBackground(Color.RED); GridBagConstraints c = new GridBagConstraints(); c.anchor = GridBagConstraints.FIRST_LINE_START; add(new JTextField(10), c); c.weightx = 1; c.gridx = 1; add(new JComboBox<>(), c); c.weightx = 0; c.gridx = 0; add(new JComboBox<>(), c); c.gridx = 1; add(new JComboBox<>(), c); c.weighty = 1; c.gridx = 0; c.gridy = 2; add(new JButton("SSSS"), c); } @Override public Dimension getPreferredSize() { Dimension dim = super.getPreferredSize(); JScrollBar sb = redSP.getHorizontalScrollBar(); if (!sb.isShowing()) return dim; return new Dimension(dim.width, dim.height + sb.getHeight()); } } public GBLSample() { setBounds(100, 100, 350, 400); contentPane = new JPanel(new BorderLayout()); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); // RED PANEL ------------------------------------------------ redSP.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER); contentPane.add(redSP, BorderLayout.PAGE_START); // BLUE PANEL ------------------------------------------------ JPanel bluePanel = new JPanel(); bluePanel.setBackground(Color.BLUE); contentPane.add(new JScrollPane(bluePanel)); } } 中所示。但是,有没有例外?当我执行gem env时,是否将gem install bundler二进制文件放入bundle

在安装任何内容之前,是否有可以查看的清单文件?

1 个答案:

答案 0 :(得分:2)

是的,有办法:

  1. 使用gem fetch GEM下载要检查的gem。这会将gem放在本地目录中。
  2. 在刚刚下载的gem上运行gem specification ./localfile.gem。这会显示YAML清单。
  3. 所有宝石都只是tar档案,所以你也可以解压缩它们。