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.
我研究linux一个月。虽然我试图在Heroku上从MySQL迁移到Postgres的所有步骤,但我遇到了一个我无法处理的错误。
When I try to install the mysqltopostgres
gem from source:
当我尝试从源代码安装mysqltopostgres gem时:
$ 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
:
我在$ 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!
我已经安装了sudo apt-get install bundler但是当我尝试输入bundle -v时我得到了同样的错误!
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
我的rvm gemset列表是
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
我使用Linux Mint 17.3
Please, help me to understand what goes wrong. I need to install mysqltopostgres
to migrate MySQL to Posgres in Heroku.
请帮我理解出了什么问题。我需要安装mysqltopostgres来将MySQL迁移到Heroku中的Posgres。
Thank you!
谢谢!
1 个解决方案
#1
17
1) Skip the sudo just run gem install bundler
1)跳过sudo只需运行gem install bundler
2) run bundle install
2)运行bundle install
Now it should work
现在它应该工作
#1
17
1) Skip the sudo just run gem install bundler
1)跳过sudo只需运行gem install bundler
2) run bundle install
2)运行bundle install
Now it should work
现在它应该工作