标签: gem

Ruby gem权限使用Ubuntu拒绝/ var/lib/gems

我正在尝试使用Gem安装Rails并从终端执行以下操作:

sudo apt-get install ruby-full build-essential
sudo apt-get install rubygems
export PATH=/var/lib/gems/1.8/bin:$PATH
gem install rails
Run Code Online (Sandbox Code Playgroud)

然后我收到以下消息:

错误:执行gem时...(Errno:EACCES)权限被拒绝 - /var/lib/gems

我遵循了Ubuntu帮助指南中的说明,我使用Oracle VM VirtualBox在Windows 7下运行Ubuntu,并使用RubyGems v1.8.15.

ruby ubuntu gem

40
推荐指数
1
解决办法
3万
查看次数

如何从Gemfile中查看依赖树?

这样做时我收到以下错误 bundle install

Make sure that `gem install couchbase -v '1.3.3'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)

现在,我没有把这个宝石包括在内Gemfile,所以它来自一些依赖.我怎么能弄清楚哪个宝石依赖于这个沙发基础宝石?

因为bundle install失败了,我不必Gemfile.lock弄清楚这种依赖性.

ruby gem bundler

40
推荐指数
2
解决办法
2万
查看次数

在gem中放置/访问配置文件的位置?

我正在编写我的第一个gem,我希望用户通过config.yml文件检索和设置特定选项.

这个文件应放在我的gem文件结构中的哪个位置以及有人在安装我的gem时如何修改文件?我猜他们可以在安装gem时传递特定的选项,这些选项可以映射到config.yml文件,但这怎么可能?

另外,是通过YAML.load_file检索文件的最佳方法吗?

我看过Ryan关于通过Bundler创建宝石的轨道广播,但他没有涉及这个话题.

ruby gem yaml config

39
推荐指数
2
解决办法
1万
查看次数

拉不可能,因为你有未合并的文件,git stash不起作用.不想承诺

我只是想拉.我有更改无视,我的Gemfile和Gemlock文件,我很乐意只是覆盖它们而只是拉.我试着把我的变化藏起来,这对我来说没有用.我该怎么办?

git pull
M   Gemfile
U   Gemfile.lock
Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
~/projects/sms/apps2/apps2_admin(apps2)$ git stash save "saved"
Gemfile.lock: needs merge
Gemfile.lock: needs merge
Gemfile.lock: unmerged (4ea16799dba7bfe1db28adecf36dee1af5195c1a)
Gemfile.lock: unmerged (e77439c9f86d1d0eda7ae0787e3e158f90959e68)
Gemfile.lock: unmerged (d690d3860db1aa8e46c1bb2f4de3e52a297b5c26)
fatal: git-write-tree: error building trees
Cannot save the current index state
~/projects/sms/apps2/apps2_admin(apps2)$ git pull
M   Gemfile
U   Gemfile.lock
Pull is …
Run Code Online (Sandbox Code Playgroud)

git gem ruby-on-rails git-stash git-pull

38
推荐指数
2
解决办法
9万
查看次数

如何检查是否安装了宝石?

我为Sinatra项目安装了data_mapper.好奇,为什么我这样做gem install brew,我可以$ which brew得到它的位置的路径,不能为data_mapper?这适用于某些宝石而不适用于其他宝石.

如何验证宝石安装是否正确?检查版本会确保gem正确下载吗?

ruby gem

38
推荐指数
2
解决办法
4万
查看次数

如何修改Ruby gem

如何修改现有的*.gem文件?我想修改gem中的Rakefile,以便它能够在Windows上编译.

ruby gem

37
推荐指数
5
解决办法
3万
查看次数

安装不与Home Brew一起使用的Ruby gem

我安装的宝石sudo gem install ...无法执行(我得到了command not found).他们似乎安装在/usr/local/Cellar/Brew的安装目录中(同样,宝石/Library/Ruby/也不起作用).还有什么我需要做的才能使宝石可执行吗?我在Mac OS X 10.6上使用ZSH,在Brew中使用Ruby v1.8.

编辑:它似乎现在正在运作.我刚出去几个小时又回来再试一次.

ruby macos bash gem homebrew

37
推荐指数
5
解决办法
5万
查看次数

therubyracer安装错误

正如你在下面看到的,libv8安装得很好,但是therubyracer却没有.我正在使用Mac 10.7.4.

~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1> gem install libv8
Building native extensions.  This could take a while...
Successfully installed libv8-3.11.8.3
1 gem installed
Installing ri documentation for libv8-3.11.8.3...
Installing RDoc documentation for libv8-3.11.8.3...

~/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1> gem install therubyracer
Building native extensions.  This could take a while...
ERROR:  Error installing therubyracer:
    ERROR: Failed to build gem native extension.

        /Users/rdp/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb
checking for main() in -lobjc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check …
Run Code Online (Sandbox Code Playgroud)

gem therubyracer

37
推荐指数
4
解决办法
4万
查看次数

在Go中编写Ruby扩展(golang)

是否有一些关于如何为Go in Ruby编写扩展的教程或实践课程?

ruby gem rubygems go

37
推荐指数
2
解决办法
7894
查看次数

在Windows 7上安装Ruby MYSQL2 gem

我正在尝试在Windows 7上安装mysql2 gem我从mysql站点下载了连接器并将libmysql.dll放在ruby200\bin中

然后做gem安装mysql2

这些是我昏暗的结果吗?

Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
        ERROR: Failed to build gem native extension.

    C:/Ruby200/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided …
Run Code Online (Sandbox Code Playgroud)

ruby gem mysql2

35
推荐指数
3
解决办法
4万
查看次数

标签 统计

gem ×10

ruby ×8

bash ×1

bundler ×1

config ×1

git ×1

git-pull ×1

git-stash ×1

go ×1

homebrew ×1

macos ×1

mysql2 ×1

ruby-on-rails ×1

rubygems ×1

therubyracer ×1

ubuntu ×1

yaml ×1