1

I believe I have an environment setup issue here, which I cannot seem to figure out. Trying to generate a migration in order to set up my Users table, but keep receiving the following message.

gem pristine --all

Sunnys-MBP:Vine SunnyPatel$ rails generate migration Users /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/msgpack-1.3.1/lib/msgpack.rb:11:in `require': incompatible library version - /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/msgpack-1.3.1/lib/msgpack/msgpack.bundle (LoadError) from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/msgpack-1.3.1/lib/msgpack.rb:11:in `rescue in <top (required)>' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/msgpack-1.3.1/lib/msgpack.rb:8:in `<top (required)>' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/store.rb:3:in `require' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/store.rb:3:in `block in <top (required)>' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.5/lib/bootsnap/explicit_require.rb:43:in `rescue in with_gems' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.5/lib/bootsnap/explicit_require.rb:39:in `with_gems' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/store.rb:3:in `<top (required)>' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache.rb:74:in `require_relative' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache.rb:74:in `<top (required)>' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.5/lib/bootsnap.rb:3:in `require_relative' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.5/lib/bootsnap.rb:3:in `<top (required)>' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.5/lib/bootsnap/setup.rb:1:in `require_relative' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/bootsnap-1.4.5/lib/bootsnap/setup.rb:1:in `<top (required)>' from /Users/SunnyPatel/Desktop/Vine/config/boot.rb:4:in `require' from /Users/SunnyPatel/Desktop/Vine/config/boot.rb:4:in `<top (required)>' from /Users/SunnyPatel/Desktop/Vine/config/application.rb:1:in `require_relative' from /Users/SunnyPatel/Desktop/Vine/config/application.rb:1:in `<top (required)>' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/spring-2.1.0/lib/spring/application.rb:92:in `require' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/spring-2.1.0/lib/spring/application.rb:92:in `preload' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/spring-2.1.0/lib/spring/application.rb:157:in `serve' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/spring-2.1.0/lib/spring/application.rb:139:in `run' from /Users/SunnyPatel/.rvm/gems/ruby-2.5.1/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>' from /Users/SunnyPatel/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require' from /Users/SunnyPatel/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require' from -e:1:in `<main>' 
1

1 Answer 1

0

This is likely due to the fact that the system version of ruby is different to the version for your application.

Try appending bundle exec to your command.

bundle exec rails generate migration Users 

Also, it's not likely that your command will work. You want to create a new User model? Then you want this command instead:

bundle exec rails generate model User 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.