0
votes

I originally posted this at Super User, but now think it should be here instead...

I'm trying to port my RoR webapp over to a DreamHost VPS. I've upgraded the VPS --> Ruby 1.9.2 from 1.8.7 and am using Rails 3.0.1 and the mysql2 (0.2.6) gem. I'm getting the following error when trying to start mongrel:

/usr/bin/ruby1.8: symbol lookup error: /home/USERNAME/.gems/gems/mysql2-0.2.6/lib/mysql2/mysql2.so: undefined symbol: rb_intern2

...so I tried using the mysql (2.8.1) gem instead and get the following error:

wrong argument type Mysql (expected Struct) (TypeError)

0 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/mysql_adapter.rb 600 in real_connect'
1 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/mysql_adapter.rb 600 in
connect'
2 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/mysql_adapter.rb 164 in initialize'
3 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/mysql_adapter.rb 36 in
new'
4 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/mysql_adapter.rb 36 in mysql_connection'
5 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb 230 in
send'
6 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb 230 in new_connection'
7 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb 238 in
checkout_new_connection'
8 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb 194 in checkout'
9 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb 190 in
loop'
10 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb 190 in checkout'
11 /usr/lib/ruby/1.8/monitor.rb 242 in
synchronize'
12 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb 189 in checkout'
13 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb 96 in
connection'
14 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb 318 in retrieve_connection'
15 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_specification.rb 97 in
retrieve_connection'
16 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_specification.rb 89 in connection'
17 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/associations.rb 1804 in
create_has_and_belongs_to_many_reflection'
18 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/associations.rb 1411 in has_and_belongs_to_many'
19 /home/USERNAME/.gems/gems/activerecord-3.0.1/lib/active_record/autosave_association.rb 137 in
has_and_belongs_to_many'
20 /home/USERNAME/portfoliofinearts.ca/farr/app/models/project.rb 3
21 /home/USERNAME/.gems/gems/activesupport-3.0.1/lib/active_support/dependencies.rb 239 in require'
22 /home/USERNAME/.gems/gems/activesupport-3.0.1/lib/active_support/dependencies.rb 239 in
require'
23 /home/USERNAME/.gems/gems/activesupport-3.0.1/lib/active_support/dependencies.rb 227 in load_dependency'
24 /home/USERNAME/.gems/gems/activesupport-3.0.1/lib/active_support/dependencies.rb 239 in
require'
25 /home/USERNAME/.gems/gems/activesupport-3.0.1/lib/active_support/dependencies.rb 346 in require_or_load'
26 /home/USERNAME/.gems/gems/activesupport-3.0.1/lib/active_support/dependencies.rb 300 in
depend_on'
27 /home/USERNAME/.gems/gems/activesupport-3.0.1/lib/active_support/dependencies.rb 216 in require_dependency'
28 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/engine.rb 138 in
eager_load!'
29 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/engine.rb 137 in each'
30 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/engine.rb 137 in
eager_load!'
31 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/engine.rb 135 in each'
32 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/engine.rb 135 in
eager_load!'
33 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/application.rb 108 in eager_load!'
34 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/application/finisher.rb 41
35 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/initializable.rb 25 in
instance_exec'
36 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/initializable.rb 25 in run'
37 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/initializable.rb 50 in
run_initializers'
38 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/initializable.rb 49 in each'
39 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/initializable.rb 49 in
run_initializers'
40 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/application.rb 134 in initialize!'
41 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/application.rb 77 in
send'
42 /home/USERNAME/.gems/gems/railties-3.0.1/lib/rails/application.rb 77 in method_missing'
43 /home/USERNAME/mydomain.com/test_app/config/environment.rb 10
44 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in
gem_original_require'
45 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in require'
46 config.ru 3
47 /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb 46 in
instance_eval'
48 /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb 46 in initialize'
49 config.ru 1 in
new'
50 config.ru 1

I'd prefer to use mysql2, so that's the preferred solution I'm looking for, but I will certainly appreciate input on either problem.

I'm not encountering any problems such as this in my development environment (which is windows)

1
When happens when you try to run a bundler command like bundle list?Steven
@Steven Xu - bundle list works. though I should add that there is a Warning : /usr/lib/ruby/gems/1.8/specifications/archive-tar-minitar-0.5.1.gemspec:12: invalid multibyte char (UTF-8) /usr/lib/ruby/gems/1.8/specifications/archive-tar-minitar-0.5.1.gemspec:12: syntax error, unexpected tIDENTIFIER, expecting keyword_end ...d heavily on Mauricio Fernández's implementation in rpa-base... - though I will be trying the uninstall of Ruby 1.8 as mentioned belowdaz13
the uninstall on Ruby 1.8 did get rid of the above warning.daz13

1 Answers

1
votes

You'd mentioned that you're running Ruby 1.9.2 but your error dump looks like it's running Ruby 1.8 I'm not sure that this would cause the problem or not but it seems like a potential issue.

I'd uninstall ruby1.8 and see if it fixes anything.

sudo apt-get remove ruby1.8