# Plugin gem install error when source is Taobao

**URL:** https://meta.discourse.org/t/plugin-gem-install-error-when-source-is-taobao/29639
**Category:** Support
**Created:** [June 4, 2015, 8:38am UTC](https://meta.discourse.org/t/plugin-gem-install-error-when-source-is-taobao/29639 "2015-06-04T08:38:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)
#### Post date: [June 4, 2015, 8:38am UTC](https://meta.discourse.org/t/plugin-gem-install-error-when-source-is-taobao/29639/1 "2015-06-04T08:38:55Z")

</div>

Plugin uses `gem` failed because of a type error. It seems only happens when gem source is Taobao no matter which gems specified or plugin required them.

```
ERROR: While executing gem ... (TypeError)
no implicit conversion of nil into String
I, [2015-06-04T06:21:40.571504 #37] INFO -- : gem install akismet -v 1.0.2 -i /var/www/discourse/plugins/discourse-akismet/gems/2.0.0 --no-document --ignore-dependencies

```

The problem is that gem can’t be downloaded. However I can manually install the gem by putting the same command which is weird to me.

---

<div class="post-metadata">

### Author: ![fantasticfears](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fantasticfears/32/119608_2.png) [@fantasticfears](https://meta.discourse.org/u/fantasticfears)
#### Post date: [June 11, 2015, 6:51am UTC](https://meta.discourse.org/t/plugin-gem-install-error-when-source-is-taobao/29639/2 "2015-06-11T06:51:36Z")

</div>

Bundler now supports inline Gemfile. Maybe helpful.

[https://github.com/bundler/bundler/pull/3440](https://github.com/bundler/bundler/pull/3440)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [June 11, 2015, 8:07am UTC](https://meta.discourse.org/t/plugin-gem-install-error-when-source-is-taobao/29639/3 "2015-06-11T08:07:13Z")

</div>

one option I discussed with andre is a git repo that has all the gems you can simply pull from.

---

<div class="post-metadata">

### Author: ![emanuelet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/emanuelet/32/121710_2.png) [@emanuelet](https://meta.discourse.org/u/emanuelet)
#### Post date: [January 28, 2016, 7:58am UTC](https://meta.discourse.org/t/plugin-gem-install-error-when-source-is-taobao/29639/4 "2016-01-28T07:58:47Z")

</div>

I tried to add the following code in my plugin.rb

```
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'polymer-elements-rails', :github => "https://github.com/scarhand/polymer-elements-rails"
end

```

and I tried to launch bundle install (or also bundle exec bundle install) in the vagrant box, but it doesn’t seem to see it.

What I am doing wrong?

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [July 24, 2022, 8:02am UTC](https://meta.discourse.org/t/plugin-gem-install-error-when-source-is-taobao/29639/6 "2022-07-24T08:02:27Z")

</div>


