问题描述
我学习linux 1个月。尽管我试图从中执行所有步骤,但我遇到了一个我无法解决的错误当我尝试从源代码安装 mysqltopostgres
gem时: $
$ b
$ git clone https://github.com/maxlapshin/mysql2postgres.git
$ cd mysql2postgres
$ bundle install
$ gem build mysqltopostgres.gemspec
$ sudo gem install mysqltopostgres-0.2.20.gem
I在 $ bundle install
:
/ home / franchb / .rvm / rubies / ruby-2.3.0 / lib / ruby / 2.3.0 / rubygems / core_ext /
kernel_require.rb:55:在'require'中:无法加载这样的文件 - bundler(LoadError)$ b $ from /home/franchb/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/
kernel_require.rb:55:in'require'
from / usr / bin / bundle:7:in< main>'
code > sudo apt-get install bundler 但是当我尝试输入 bundle -v
时出现同样的错误!
我的 gem env
是:
RubyGems环境:
- RUBYGEMS VERSION:2.5.1
- RUBY VERSION:2.3.0(2015-12-25 patchlevel 0)[x86_64-linux]
- 安装目录:/ home / franchb / .rvm / gems / ruby-2.3.0 @ global
- USER安装目录:/home/franchb/.gem/ruby/2.3.0
- RUBY EXECUTABLE:/home/franchb/.rvm/ ruby-2.3.0 / bin / ruby
- 可执行目录:/home/franchb/.rvm/gems/ruby-2.3.0@global/bin
- SPEC CACHE DIRECTORY:/ home / franchb / .gem / specs
- 系统配置目录:/home/franchb/.rvm/rubies/ruby-2.3.0/etc
- RUBYGEMS平台:
- ruby
- x86_64-linux
- 创业板路径:
- /home/franchb/.rvm/gems/ruby-2.3.0@global
- 创业板配置:
- :update_sources = > true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- 远程来源:
- https://rubygems.org/
- SHELL路径:
- /home/franchb/.rvm/gems/ruby-2.3.0 @ global / bin
- /home/franchb/.rvm/rubies/ruby-2.3.0/bin
- /home/franchb/.rvm/bin
- / home / franchb / bin
- / usr / local / sbin
- / usr / local / bin
- / usr / sbin
- / usr / bin
- / sbin
- / bin
- / usr / games
- / usr / local / games
My rvm gemset list
是
gemsets for ruby- 2.3.0(位于/home/franchb/.rvm/gems/ruby-2.3.0)
(默认)
=>全球
rails230
我的宝石清单是
***本地GEMS ***
bigdecimal(1.2.8)
bundler-unload(1.0.2)$ b $ (1.0.2)
可执行文件钩子(1.3.2)
gem-wrappers(1.2.7)
io-console(0.4.5)
json(1.8 .3)
minitest(5.8.3)
net-telnet(0.1.1)
power_assert(0.2.6)
psych(2.0.17)
rake (10.4.2)
rdoc(4.2.1)
rubygems-bundler(1.4.4)
rvm(1.11.3.9)
测试单元(3.1.5)
我使用Linux Mint 17.3
帮助我理解出了什么问题。我需要安装 mysqltopostgres
将MySQL迁移到Heroku中的Posgres。
谢谢!
跳过sudo运行 gem install bundler
2)运行 bundle install
现在应该可以工作了
I study linux for 1 month. While I tried to make all steps from Migrating from MySQL to Postgres on Heroku I've got an error I could not handle.
When I try to install the mysqltopostgres
gem from source:
$ git clone https://github.com/maxlapshin/mysql2postgres.git
$ cd mysql2postgres
$ bundle install
$ gem build mysqltopostgres.gemspec
$ sudo gem install mysqltopostgres-0.2.20.gem
I have an error on $ bundle install
:
/home/franchb/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/
kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)
from /home/franchb/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/
kernel_require.rb:55:in `require'
from /usr/bin/bundle:7:in `<main>'
I've installed sudo apt-get install bundler
but when i try enter bundle -v
I get the same error!
My gem env
is:
RubyGems Environment:
- RUBYGEMS VERSION: 2.5.1
- RUBY VERSION: 2.3.0 (2015-12-25 patchlevel 0) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/franchb/.rvm/gems/ruby-2.3.0@global
- USER INSTALLATION DIRECTORY: /home/franchb/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /home/franchb/.rvm/rubies/ruby-2.3.0/bin/ruby
- EXECUTABLE DIRECTORY: /home/franchb/.rvm/gems/ruby-2.3.0@global/bin
- SPEC CACHE DIRECTORY: /home/franchb/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /home/franchb/.rvm/rubies/ruby-2.3.0/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/franchb/.rvm/gems/ruby-2.3.0@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /home/franchb/.rvm/gems/ruby-2.3.0@global/bin
- /home/franchb/.rvm/rubies/ruby-2.3.0/bin
- /home/franchb/.rvm/bin
- /home/franchb/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/local/games
My rvm gemset list
is
gemsets for ruby-2.3.0 (found in /home/franchb/.rvm/gems/ruby-2.3.0)
(default)
=> global
rails230
My gem list is
*** LOCAL GEMS ***
bigdecimal (1.2.8)
bundler-unload (1.0.2)
did_you_mean (1.0.0)
executable-hooks (1.3.2)
gem-wrappers (1.2.7)
io-console (0.4.5)
json (1.8.3)
minitest (5.8.3)
net-telnet (0.1.1)
power_assert (0.2.6)
psych (2.0.17)
rake (10.4.2)
rdoc (4.2.1)
rubygems-bundler (1.4.4)
rvm (1.11.3.9)
test-unit (3.1.5)
I use Linux Mint 17.3
Please, help me to understand what goes wrong. I need to install mysqltopostgres
to migrate MySQL to Posgres in Heroku.
Thank you!
1) Skip the sudo just run gem install bundler
2) run bundle install
Now it should work
这篇关于带有@global gem的Ruby / RVM - 捆绑包运行失败并带有'require':无法加载这样的文件 - bundler(LoadError)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!