2016年1月3日日曜日

Update Ruby Version On Using Rails 4. Update from Ruby 2.2.4 to Ruby 2.3.0.

  • Published Date:Jun. 3, 2016

Article Summary


This article describes how to update from Ruby 2.2.4 to Ruby 2.3.0 on Rails 4.

Environment


  • Rails4.2.5
  • Ruby2.2.4 → Ruby2.3.0

Switch Ruby2.3.0


ruby 2.3.0 to proceed with the description in the premise on which it is installed.

terminal

// switch ruby version
rbenv global 2.3.0

ruby -v
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

Install required Gem


Install required Gem for ruby 2.3.0p0.

terminal

// confirm gem version.
rbenv exec gem -v
2.5.1

rbenv exec gem list --local

*** LOCAL GEMS ***

bigdecimal (1.2.8)
did_you_mean (1.0.0)
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)
test-unit (3.1.5)

// install bundler for ruby 2.3.0p0 
rbenv exec gem install bundler

rbenv exec gem list --local

*** LOCAL GEMS ***

bigdecimal (1.2.8)
bundler (1.11.2)
did_you_mean (1.0.0)
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)
test-unit (3.1.5)

After Confirming ruby 2.3.0 and gem, Install required gem for rails project.

terminal

// move project folder
cd {prohect_folder}

// confirm gemfile.lock

// execute bundle install
rbenv exec bundle install --path /home/vagrant/vanish/dev/vendor/bundle

Bundle complete! 18 Gemfile dependencies, 70 gems now installed.

After completion, you execute test to confirm degradation.

terminal

// execute test
rbenv exec bundle exec rspec

Finished in 0.7514 seconds (files took 6.03 seconds to load)
42 examples, 0 failures, 4 pending

Worked out well.

Conclusion


In my case, It was easy to change from Ruby 2.2.4 to Ruby 2.3.0.
You should try it.
From now on, I will try to implement new function of Ruby 2.3.0.
Thank you for reading this article.

See you.

Recommended Book for Rails 4 Developer


For Improving your ruby programming.


Administrating Site(createing rails)


日本語

0 件のコメント:

コメントを投稿