rails sqlite adapter error

前端 未结 6 1799
傲寒
傲寒 2020-12-16 12:21

I\'m following the instructions in rails tutorial and got stuck when trying to use the scaffold command.

When running:

rails generate scaffold User n         


        
6条回答
  •  有刺的猬
    2020-12-16 13:14

    The important part of your error message is this snippet:

    can't activate sqlite3 (~> 1.3.4), already activated sqlite3-1.3.3-x86-mingw32. Make sure all dependencies are added to Gemfile.
    

    To fix that, you should always run your commands through bundle exec like so

    bundle exec rails generate scaffold User name:string email:string 
    

    That way, you give bundler to take full control over your $LOAD_PATH which will probably resolve these issues.

提交回复
热议问题