Top "Ruby-2.0" questions

For issues relating to development in Ruby, version 2.0. If your question applies to Ruby in general, use the tag [ruby].

cannot load such file -- bundler/setup (LoadError)

I'm setting Rails 4 application with Ruby 2.0, but I'm getting "Web application could not be started" and get this trace: cannot …

rubygems ruby-on-rails-4 passenger ruby-2.0
Named parameters in Ruby 2

I don't understand completely how named parameters in Ruby 2.0 work. def test(var1, var2, var3) puts "#{var1} #{var2} #{var3}" end …

ruby ruby-2.0
Ruby on Rails - "Add 'gem sqlite3'' to your Gemfile"

I was following the Rails tutorial, but I got stuck when it said to type rails server in the blog …

ruby-on-rails ruby sqlite ruby-on-rails-4 ruby-2.0
-bash: __git_ps1: command not found

I tried to install Ruby 2.0. My command line urped and now looks like the following: -bash: __git_ps1: command not …

bash shell command git-bash ruby-2.0
Getting "Warning! PATH is not properly set up" when doing rvm use 2.0.0 --default

Above doesn't work first time, works 2nd time. Try to set ruby version to 2.0.0 for any new shell windows. Doing $ …

ruby bash rvm ruby-2.0 .bash-profile
How to install Ruby 2 on Ubuntu without RVM

I want to install ruby 2.0 using sudo apt-get install ruby2.0 But there isn't available package for ruby2.0 I want to …

ruby ubuntu-12.04 apt-get ruby-2.0
Rails - Get the time difference in hours, minutes and seconds

I'm looking for an idiomatic way to get the time passed since a given date in hours, minutes and seconds. …

ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-4 ruby-2.0
Ruby 2.0.0 String#Match ArgumentError: invalid byte sequence in UTF-8

I see this a lot and haven't figured out a graceful solution. If user input contains invalid byte sequences, I …

ruby-on-rails ruby ruby-on-rails-4 ruby-2.0
Unexpected Return (LocalJumpError)

What is the problem with this Ruby 2.0 code? p (1..8).collect{|denom| (1...denom).collect{|num| r = Rational(num, denom) if r &…

ruby ruby-2.0
"bin/rails: No such file or directory" w/ Ruby 2 & Rails 4 on Heroku

While following the Rails 4 Beta version of Michael Hartl's Ruby on Rails Tutorial, my app fails to start on Heroku, …

ruby-on-rails ruby heroku ruby-on-rails-4 ruby-2.0