@jameslopez: unfortunately I can't run workaround…
Also, this problem affects new projects (can't create any)
~/gitlab $ ./bin/rails runner "Project.where.not(import_url: nil).each { |p| p.import_data.destroy if p.import_data }"/home/git/gitlab/config/routes.rb:30:in `block in <top (required)>': uninitialized constant LetterOpenerWeb (NameError) from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:432:in `instance_exec' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:432:in `eval_block' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:410:in `draw' from /home/git/gitlab/config/routes.rb:5:in `<top (required)>' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:40:in `block in load_paths' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:40:in `each' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:40:in `load_paths' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:16:in `reload!' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:26:in `block in updater' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/file_update_checker.rb:75:in `call' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/file_update_checker.rb:75:in `execute' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:27:in `updater' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!' from /home/git/gitlab/config/environment.rb:5:in `<top (required)>' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/runner.rb:52:in `<top (required)>' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:123:in `require' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:123:in `require_command!' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:90:in `runner' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>' from ./bin/rails:9:in `require' from ./bin/rails:9:in `<main>'
~/gitlab $ bundle exec rails runner "Project.where.not(import_url: nil).each { |p| p.import_data.destroy if p.import_data }" production/home/git/gitlab/config/routes.rb:30:in `block in <top (required)>': uninitialized constant LetterOpenerWeb (NameError) from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:432:in `instance_exec' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:432:in `eval_block' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:410:in `draw' from /home/git/gitlab/config/routes.rb:5:in `<top (required)>' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:40:in `block in load_paths' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:40:in `each' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:40:in `load_paths' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:16:in `reload!' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:26:in `block in updater' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/file_update_checker.rb:75:in `call' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/file_update_checker.rb:75:in `execute' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:27:in `updater' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `instance_exec' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:30:in `run' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:55:in `block in run_initializers' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each' from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/initializable.rb:54:in `run_initializers' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application.rb:352:in `initialize!' from /home/git/gitlab/config/environment.rb:5:in `<top (required)>' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application.rb:328:in `require_environment!' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/runner.rb:52:in `<top (required)>' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:123:in `require' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:123:in `require_command!' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:90:in `runner' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands/commands_tasks.rb:39:in `run_command!' from /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/commands.rb:17:in `<top (required)>' from bin/rails:9:in `require' from bin/rails:9:in `<main>'
@morsik that's a bit strange, it looks like your issue is not related to attr_encrypted and I would say it's more to do with your environment. Are you sure that openssl is the only one you have installed in your environment? I would suggest to upgrade it to a newest version...
Thanks @morsik - I still think that this could be something openssl related, but not 100% sure. The issue is actually not related to GitLab itself and you can see the same problem reported to attr_encrypted see https://github.com/attr-encrypted/attr_encrypted/issues/199
Can you open an irb prompt and copy the output of the following commands?
@morsik thanks! I'm guessing here again, but I think that your Ruby installation is probably missing some OpenSSL extension or something dodgy happened with the shared libraries.
This is concerning as well - "OpenSSL 1.0.0 29 Mar 2010" as I think the authenticated?() function is only available from OpenSSL >= 1.0.1
I would suggest you to reinstall Ruby making sure is compiled with OpenSSL support (and is using the system libraries, with the right version)...
I upgraded to Ruby 2.1.5 (binary!), and only thing which changed is OPENSSL_LIBRARY_VERSION is available now.
Actually I didn't compiled Ruby 2.1.2. I was using binary from RVM site: https://rvm.io/binaries/centos/6/x86_64/, and now I've upgraded to latest 2.1.x version, which afaik should works correctly with CentOS :(
After compiling to version you have specified in ~/gitlab/.ruby_version (2.1.8) it was compiled with OpenSSL 1.0.1e correctly, and irb return now: