Ok, so I realised the hard way that 1.9.1 is just too close to the edge, especially in combination with Rails 3. I installed RVM and 1.8.7 which seems to work, but whenever I start WEBrick it still insists on using 1.9.1 which causes all sorts of strange problems and exceptions. bob@silicon:~/rails/TestProject$ rvm use 1.8.7 Using ruby 1.8.7 p249 bob@silicon:~/rails/TestProject$ rails server -p 3001 => Booting WEBrick => Rails 3.0.0.beta application starting in development on http://0.0.0.0:3001 => Call with -d to detach => Ctrl-C to shutdown server [2010-03-31 13:50:09] INFO WEBrick 1.3.1 [2010-03-31 13:50:09] INFO ruby 1.9.1 (2009-12-07) [i486-linux] [2010-03-31 13:50:19] INFO WEBrick::HTTPServer#start: pid=6260 port=3001 and then /home/bob/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-3.0.0.beta/lib/ active_record/connection_adapters/mysql_adapter.rb:598: [BUG] unknown type 0x22 (0xc given) ruby 1.9.1p376 (2009-12-07 revision 26041) [i486-linux] What to do now? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
My bet is that you''re environment doesn''t have a `rails` binary and it is finding the first one it can, which happens to be 1.9.1. Does the same thing happen when you do: ∴ ./script/rails server Which will be sure to use the Rails version bundler bundled for the app with the current Ruby? You can also check to make sure you''re 1.8.7 env is correct using `rvm info` ~Wayne -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Also, you can check to see where the `rails` binary in your path is: ∴ which rails And see what ruby it is pointed at: ∴ head -n 1 $(which rails) ~Wayne -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mar 31, 2:30 pm, Cogaidhean <wayneeseg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Also, you can check to see where the `rails` binary in your path is: > > ∴ which rails > > And see what ruby it is pointed at: > > ∴ head -n 1 $(which rails) > > ~WayneMany thanks for your suggestions. bob@silicon:~/rails/TestProject$ head -n 1 $(which rails) #!/home/bob/.rvm/rubies/ruby-1.8.7-p249/bin/ruby -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mar 31, 3:14 pm, mikrogroove <o...-ghLYL0gzFSECT2ftz+WiyQ@public.gmane.org> wrote:> On Mar 31, 2:30 pm, Cogaidhean <wayneeseg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Also, you can check to see where the `rails` binary in your path is: > > ∴ which rails > > And see what ruby it is pointed at: > > ∴ head -n 1 $(which rails) > > ~Wayne > > Many thanks for your suggestions. > > bob@silicon:~/rails/TestProject$ head -n 1 $(which rails) > #!/home/bob/.rvm/rubies/ruby-1.8.7-p249/bin/rubyAlso: bob@silicon:~/rails/TestProject$ rvm info system: uname: "Linux silicon 2.6.31-14-generic-pae #48-Ubuntu SMP Fri Oct 16 15:22:42 UTC 2009 i686 GNU/Linux" shell: "bash" version: "4.0.33(1)-release" ruby: interpreter: "ruby" version: "1.8.7" date: "2010-01-10" platform: "i686-linux" patchlevel: "2010-01-10 patchlevel 249" full_version: "ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]" homes: gem: "/home/bob/.rvm/gems/ruby-1.8.7-p249" ruby: "/home/bob/.rvm/rubies/ruby-1.8.7-p249" binaries: ruby: "/home/bob/.rvm/rubies/ruby-1.8.7-p249/bin/ruby" irb: "/home/bob/.rvm/rubies/ruby-1.8.7-p249/bin/irb" gem: "/home/bob/.rvm/rubies/ruby-1.8.7-p249/bin/gem" rake: "/home/bob/.rvm/gems/ruby-1.8.7-p249/bin/rake" environment: GEM_HOME: "/home/bob/.rvm/gems/ruby-1.8.7-p249" GEM_PATH: "/home/bob/.rvm/gems/ruby-1.8.7-p249:/home/bob/.rvm/ gems/ruby-1.8.7-p249%global" BUNDLE_PATH: "/home/bob/.rvm/gems/ruby-1.8.7-p249" MY_RUBY_HOME: "/home/bob/.rvm/rubies/ruby-1.8.7-p249" IRBRC: "/home/bob/.rvm/rubies/ruby-1.8.7-p249/.irbrc" -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Other than you not being on the latest RVM the environment looks healthy from RVM''s standpoint. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mar 31, 4:12 pm, Cogaidhean <wayneeseg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Other than you not being on the latest RVM the environment looks > healthy from RVM''s standpoint.Thanks for looking at this Wayne, it''s pretty weird since everything else seems perfectly ok - I''m at a loss as to what to do to move forward and get things working again! Start from scratch? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Apr 1, 12:09 am, mikrogroove <o...-ghLYL0gzFSECT2ftz+WiyQ@public.gmane.org> wrote:> On Mar 31, 4:12 pm, Cogaidhean <wayneeseg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Other than you not being on the latest RVM the environment looks > > healthy from RVM''s standpoint. > > Thanks for looking at this Wayne, it''s pretty weird since everything > else seems perfectly ok - I''m at a loss as to what to do to move > forward and get things working again! Start from scratch?I tried installing Mongrel instead and things got even weirder... bob@silicon:~/rails/TestProject$ rvm use 1.8.7 Using ruby 1.8.7 p249 bob@silicon:~/rails/TestProject$ rvm gem install mongrel ruby-1.8.7-p249: ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux] mongrel is not installed, installing... mongrel installed. bob@silicon:~/rails/TestProject$ mongrel_rails start -p 3001 ** Starting Mongrel listening at 0.0.0.0:3001 ** Starting Rails with development environment... /home/bob/.rvm/gems/ruby-1.8.7-p249/gems/activesupport-3.0.0.beta/lib/ active_support/dependencies.rb:167:in `require'': no such file to load -- dispatcher (LoadError) ...etc -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Michael Greenly
2011-Apr-26 12:32 UTC
Re: WEBrick won''t use correct Ruby version with RVM
My advice would be to use bundler. Make sure you''re gems are listed in your Gemfile Do a "ruby -S bundle install" Then a "ruby -S bundle exec rails server" At that point you can be reasonably sure you''re not mixing multiple environments together. On Wed, Mar 31, 2010 at 7:54 AM, mikrogroove <ola-ghLYL0gzFSECT2ftz+WiyQ@public.gmane.org> wrote:> Ok, so I realised the hard way that 1.9.1 is just too close to the > edge, especially in combination with Rails 3. I installed RVM and > 1.8.7 which seems to work, but whenever I start WEBrick it still > insists on using 1.9.1 which causes all sorts of strange problems and > exceptions. > > bob@silicon:~/rails/TestProject$ rvm use 1.8.7 > Using ruby 1.8.7 p249 > bob@silicon:~/rails/TestProject$ rails server -p 3001 > => Booting WEBrick > => Rails 3.0.0.beta application starting in development on > http://0.0.0.0:3001 > => Call with -d to detach > => Ctrl-C to shutdown server > [2010-03-31 13:50:09] INFO WEBrick 1.3.1 > [2010-03-31 13:50:09] INFO ruby 1.9.1 (2009-12-07) [i486-linux] > [2010-03-31 13:50:19] INFO WEBrick::HTTPServer#start: pid=6260 > port=3001 > > and then > > /home/bob/.rvm/gems/ruby-1.8.7-p249/gems/activerecord-3.0.0.beta/lib/ > active_record/connection_adapters/mysql_adapter.rb:598: [BUG] unknown > type 0x22 (0xc given) > ruby 1.9.1p376 (2009-12-07 revision 26041) [i486-linux] > > What to do now? > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Michael Greenly http://blog.michaelgreenly.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.