0

i'm trying to upgrade my server from ruby 1.8 to 1.9 and i did that with following link. [http://kb.site5.com/ruby-on-rails/select-a-version-of-ruby-for-your-hosting-account/]

i did all the things, Now ruby -v : ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

but when i run bundle install it installs it in /vendor/bundle/ruby/1.8 folder. but when i try to run the code it checks in /vendor/bundle/ruby/1.9.1 folder.

i can't seem to run my site. i specified ruby "1.9.3" in gem filoe and try to tun bundle install it gives me an error "your ruby version is 1.8.7 but your gemfile specified 1.9.3"

which ruby : /user/local/ruby19/bin

i changed gemrc cat .gemrc

gempath: [/opt/ruby/lib/ruby/gems/1.9.1, /home/XXX/ruby/gems] also.

my site says bundle install error enter image description here

After that i tried to copy all the gems from 1.8 folder to 1.9 in vender because it was looking there then i got this error because nokogir was insalled for 1.8 and needed higher version.

enter image description here

Any idea?? i have been stuck here from hours!!!

Akki209
  • 123
  • 12
  • Can you check your .rvmrc file. possible that ruby 1.8 specified there – Hemali Nov 06 '14 at 09:10
  • Did you do all that changes run under the same user account as the user account your webserver uses? – spickermann Nov 06 '14 at 09:38
  • http://stackoverflow.com/questions/12995271/rails-server-error-ruby-version-is-1-8-7-but-your-gemfile-specified-1-9-3/21557162#21557162 – Малъ Скрылевъ Nov 06 '14 at 09:40
  • please provide `which bundler`, and `cat $(which bundler)|head -n 1` from the project's folder – Малъ Скрылевъ Nov 06 '14 at 09:42
  • Please post your gemfile as well as VHost configuration? Are you using rvm or rbenv? – BroiSatse Nov 06 '14 at 09:55
  • rvm use 1.9.3 -bash : rvm: command not found
    which bundler => /home/swapclon/.gems/bin/bundler
    cat $(which bundler)|head -n 1 => #!/user/bin/ruby
    – Akki209 Nov 06 '14 at 09:59
  • /home/swapclon/.gemrc file content (This might Help) --- gem: --no-ri --no-rdoc gemhome: /home/swapclon/.gems gempath: - /home/swapclon/.gems - /usr/lib/ruby/gems/1.8 :benchmark: false :update_sources: true :verbose: false :backtrace: false :sources: - http://gems.rubyforge.org/ - http://rubygems.org/ :bulk_threshold: 1000 – Akki209 Nov 06 '14 at 10:19
  • 1
    @Akki209 just replace in `/home/swapclon/.gems/bin/bundler` the head to `#!/user/bin/env ruby`, then issue `bundle install` – Малъ Скрылевъ Nov 06 '14 at 10:46
  • Couple of questions if you don't mind. 1) How can i do that, change what to i can code ruby but lack knowledge of config and ENV stuff? 2) now i just updated the ruby version to 1.8.7 to 1.9 i was using multiple rails site with 1.8.7 on this server, Do i have to bundle install on all of the? or dose that have backward compatibility. Thanks for all the help guys,appreciated !! – Akki209 Nov 06 '14 at 11:32
  • @Akki209 1) I don't undorstan you here, please explain in the post. 2) you shell do `bundle install` each time you have change you configuation, for example change the ruby version. – Малъ Скрылевъ Nov 06 '14 at 13:28
  • just replace in /home/swapclon/.gems/bin/bundler the head to #!/user/bin/env ruby, then issue bundle install ***** I don't know how to change that. – Akki209 Nov 06 '14 at 13:38
  • 1
    @Akki209 open the file `/home/swapclon/.gems/bin/bundler` to edit, with any of the text file editors, and then just fix the first line. – Малъ Скрылевъ Nov 06 '14 at 13:54
  • Hey sorry for late replay, That worked,Thanks a ton. i'll mark it right once you answer it. – Akki209 Nov 11 '14 at 13:16

0 Answers0