Home>
I am a beginner. There may be a problem with how you listen, but please forgive me as I will fix it as appropriate.
The behavior of Controller in Railslocalhost: 3000To confirm withrails sI was angry when I was typing.
Warning: You're using Rubygems 2.0.14 with Spring. Upgrade to at least Rubygems 2.1.0 and run `gem pristine --all` for better startup performance.
=>Booting WEBrick
=>Rails 4.2.4 application starting in development on http: // localhost: 3000
=>Run `rails server -h` for more startup options
=>Ctrl-C to shutdown server
Exiting
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/racc/parser.rb:529:in ʻon_error': (Racc :: ParseError)
・
・
・

I wonder if gem needs to be updated$gem update --systemI tried, but basically I got the following error and the server could not be started ...
ERROR: While executing gem ... (Gem :: FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

What should I do?
I am sorry that I am too beginner, but I would appreciate your help.
Thank you.
  • Answer # 1

    It depends on how you installed Ruby and Rails.
    Was it installed with a package management system such as yum, or was it installed from source?
    Also, wouldn't it be possible to get a better answer by presenting what the OS is?
    The error content when updating gem is
    It is said that you do not have write permission for the directory /Library/Ruby/Gems/2.0.0.
    What is the gem execution user?
    If the OS is ubunts, do you execute commands with sudo?
    If you installed it with a package management system such as yum, you should be able to run it as the root user.