I am developing a rails plugin. I also want to use devise in it...
This is an excerpt from its gemspec:
s.add_dependency "rails", "~> 4.1.0"
s.add_dependency "devise"
This is the error log I retrieve:
→ RAILS_ENV=test rake db:migrate
rake aborted!
NameError: uninitialized constant Devise
/Users/boti/Rails/multitenancy/subscribem/config/initializers/devise.rb:3:in `<top (required)>'
/Users/boti/.rvm/gems/ruby-2.1.1#multitenancy/gems/railties-4.1.0/lib/rails/engine.rb:648:in `block in load_config_initializer'
/Users/boti/.rvm/gems/ruby-2.1.1#multitenancy/gems/activesupport-4.1.0/lib/active_support/notifications.rb:161:in `instrument'
/Users/boti/.rvm/gems/ruby-2.1.1#multitenancy/gems/railties-4.1.0/lib/rails/engine.rb:647:in `load_config_initializer'
/Users/boti/.rvm/gems/ruby-2.1.1#multitenancy/gems/railties-4.1.0/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
/Users/boti/.rvm/gems/ruby-2.1.1#multitenancy/gems/railties-4.1.0/lib/rails/engine.rb:611:in `each'
/Users/boti/.rvm/gems/ruby-2.1.1#multitenancy/gems/railties-4.1.0/lib/rails/engine.rb:611:in `block in <class:Engine>'
/Users/boti/.rvm/gems/ruby-2.1.1#multitenancy/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `instance_exec'
/Users/boti/.rvm/gems/ruby-2.1.1#multitenancy/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run'
/Users/boti/.rvm/gems/ruby-2.1.1#multitenancy/gems/railties-4.1.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/boti/.rvm/gems/ruby-2.1.1#multitenancy/gems/railties-4.1.0/lib/rails/initializable.rb:54:in `run_initializers'
/Users/boti/.rvm/gems/ruby-2.1.1#multitenancy/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!'
/Users/boti/Rails/multitenancy/subscribem/spec/dummy/config/environment.rb:5:in `<top (required)>'
Related
I am trying to start redmine and I got this error
NameError: uninitialized constant Mime::CSV
/usr/share/redmine/config/initializers/20-mime_types.rb:4:in `<top (required)>'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:666:in `block in load_config_initializer'
/var/lib/gems/2.5.0/gems/activesupport-6.0.3.2/lib/active_support/notifications.rb:182:in `instrument'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:665:in `load_config_initializer'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:625:in `block (2 levels) in <class:Engine>'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:624:in `each'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/engine.rb:624:in `block in <class:Engine>'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `instance_exec'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:32:in `run'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:50:in `each'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:50:in `tsort_each_child'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/initializable.rb:60:in `run_initializers'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/application.rb:363:in `initialize!'
/usr/share/redmine/config/environment.rb:14:in `<top (required)>'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/application.rb:339:in `require_environment!'
/var/lib/gems/2.5.0/gems/railties-6.0.3.2/lib/rails/application.rb:523:in `block in run_tasks_blocks'
/var/lib/gems/2.5.0/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/var/lib/gems/2.5.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => environment
Version of rails: Rails 6.0.3.2. I have tried to add require 'mime' to the 20-mime_types.rb file, but it doesn't work.
You didn't mention the Redmine version you've used, but even latest Redmine for now (4.1.7) expects Rails 5.1
So please take into account official requirements
This is the error I am getting in using bundle exec rspec spec/requests/static_pages_spec.rb.
I have included gem test-unit.
Please help I am completely new to rails.
/home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-rails-2.13.1/lib/rspec/rails/fixture_support.rb:19:in `block (2 levels) in <module:FixtureSupport>': private method `fixture_path' called for #<RSpec::Core::Configuration:0x005584a641b380> (NoMethodError)
Did you mean? fixture_path=
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-rails-2.13.1/lib/rspec/rails/fixture_support.rb:17:in `class_eval'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-rails-2.13.1/lib/rspec/rails/fixture_support.rb:17:in `block in <module:FixtureSupport>'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.0.8/lib/active_support/concern.rb:114:in `class_eval'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.0.8/lib/active_support/concern.rb:114:in `append_features'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:791:in `include'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:791:in `safe_include'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:785:in `block in configure_group'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:783:in `each'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:783:in `configure_group'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/world.rb:47:in `configure_group'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/example_group.rb:290:in `set_it_up'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/example_group.rb:241:in `subclass'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/example_group.rb:228:in `describe'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/dsl.rb:18:in `describe'
from /home/sarfraz/Desktop/Rails Apps/sample_app/spec/requests/static_pages_spec.rb:3:in `<top (required)>'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
from /home/sarfraz/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
The simplest solution is to upgrade rspec-rails. For example you can use gem 'rspec-rails', '~>2.13' in your Gemfile and do bundle update rspec-rails from a terminal. It setups 2.99.x for you. This version is workable with at least ruby 2.3.4 and provides backward compatibility.
I have troubles deploying my RoR-app to Heroku. I've changed the database to postgresql, so thats ok. But I get an error with the simple_form gem. I've tried many different approaches available on the net, but no go..
Here's the error message:
rake aborted!
NameError: uninitialized constant SimpleForm
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/config/initializers/simple_form.rb:2:in `<top (required)>'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/config/environment.rb:5:in `<top (required)>'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/tmp/build_1b6d5373d9f274355d732fd1b0235bfb/gauteremen-workout_log-965e78a/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.0/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
Here's the new error message, after adding require 'simple_form' in the simple_form.rb
LoadError: cannot load such file -- simple_form
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/config/initializers/simple_form.rb:1:in `<top (required)>'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/config/environment.rb:5:in `<top (required)>'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/tmp/build_ed1c1754ca789044f8c2eb91cebaac26/gauteremen-workout_log-cb80141/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.0/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
I found out what the problem was. I had placed gems used in the application under development and test in the Gemfile. This resulted in that the Gems were not included in the deployment. I got the same error for bootstrap, so next time I will be sure to add gems outside the dev and test clause.
Thanks for the help though :)
I think you have not pushed your updated Gemfile and Gemfile.lock on heroku.
I'm using Ruby 1.9.3 and Rails 3.2.17 for this project. I plan to upgrade to Rails 4 but meet a lot gem incompatibilities, so I try to update some gem at first.
I am updating formtastic from 2.0.2 to 3.1.3.
I see a lot of deprecation warnings like this:
DEPRECATION WARNING: input_class is deprecated and will be removed from Formtastic 4.0 (configure Formtastic::FormBuilder.input_class_finder instead (upgrade guide on wiki: http://bit.ly/1F9QtKc )). (called from _app_views_prescriptions__fields_html_haml___278490936240938991_103076320 at /home/hegwin/Workspace/rails_projects/pharmmd/app/views/prescriptions/_fields.html.haml:7)
And I followed formtastic wiki Upgrading to Formtastic 3.1 , and I added these two lines to config/initializers/formtastic.rb
Formtastic::FormBuilder.action_class_finder = Formtastic::ActionClassFinder
Formtastic::FormBuilder.input_class_finder = Formtastic::InputClassFinder
After that when I tried to run the rspec, it threw an error:
NoMethodError: undefined method `eager_load' for #<Rails::Application::Configuration:0x00000006306a50>
/home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/railtie/configuration.rb:85:in `method_missing': undefined method `eager_load' for #<Rails::Application::Configuration:0x00000006459b50> (NoMethodError)
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/formtastic-3.1.3/lib/formtastic/namespaced_class_finder.rb:32:in `use_const_defined?'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/formtastic-3.1.3/lib/formtastic/namespaced_class_finder.rb:69:in `<class:NamespacedClassFinder>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/formtastic-3.1.3/lib/formtastic/namespaced_class_finder.rb:24:in `<module:Formtastic>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/formtastic-3.1.3/lib/formtastic/namespaced_class_finder.rb:1:in `<top (required)>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/formtastic-3.1.3/lib/formtastic/action_class_finder.rb:7:in `<module:Formtastic>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/formtastic-3.1.3/lib/formtastic/action_class_finder.rb:1:in `<top (required)>'
from /home/hegwin/Workspace/rails_projects/pharmmd/config/initializers/formtastic.rb:104:in `<top (required)>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:50:in `load'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:50:in `load'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/zeus-0.13.3/lib/zeus/load_tracking.rb:43:in `load'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `block in load'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/engine.rb:592:in `each'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/engine.rb:592:in `block in <class:Engine>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `instance_exec'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `run'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `each'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `run_initializers'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/application.rb:136:in `initialize!'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/hegwin/Workspace/rails_projects/pharmmd/config/environment.rb:5:in `<top (required)>'
from /home/hegwin/Workspace/rails_projects/pharmmd/spec/spec_helper.rb:12:in `require'
from /home/hegwin/Workspace/rails_projects/pharmmd/spec/spec_helper.rb:12:in `<top (required)>'
from /home/hegwin/Workspace/rails_projects/pharmmd/spec/features/patient_edit_medication.feature:1:in `require'
from /home/hegwin/Workspace/rails_projects/pharmmd/spec/features/patient_edit_medication.feature:1:in `<top (required)>'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `block in load_spec_files'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `each'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in `load_spec_files'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in `run'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:in `run'
from /home/hegwin/.rvm/gems/ruby-1.9.3-p362#medpro/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun'
The issue is known to the formtastic team. See issues #1137 and #1135 for details. In short, a stop-gap measure is to utilize the issue_1135 branch of the sepastian fork. Here's the Gemfile line:
gem 'formtastic', :git => 'git://github.com/sepastian/formtastic.git', :branch => 'issue_1135'
A better idea is to fork that branch to create your own repository.
I just upgraded my OS X from 10.7.5 to 10.9.3.
I've done the following:
- Upgraded ruby to 2.1.2 (and using it)
- bundle install succeeded
- installed postgres, server running.
$rails server -p 5000
works (the server runs)
However, when I do
$rake db:migrate
It gives me the following error:
rake aborted!
NameError: uninitialized constant AbstractController::Error
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.1/lib/abstract_controller/rendering.rb:8:in `<module:AbstractController>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.1/lib/abstract_controller/rendering.rb:7:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/helpers/rails_323_textarea_fix.rb:1:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/helpers/action_view_mods.rb:260:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/template.rb:3:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml.rb:41:in `block in init_rails'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml.rb:41:in `each'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml.rb:41:in `init_rails'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/railtie.rb:16:in `block (2 levels) in <top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `each'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/haml-3.1.6/lib/haml/railtie.rb:15:in `block in <top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:44:in `each'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/bootstrap.rb:76:in `block in <module:Bootstrap>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `public_send'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `method_missing'
/Users/ppd/Academics/Research/git/teapot/config/environment.rb:5:in `<top (required)>'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:264:in `require_environment!'
/Users/ppd/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:367:in `block in run_tasks_blocks'
/Users/ppd/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/Users/ppd/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
I can't seem to find anything on this on google/SO. I'd really appreciate help with it!
I haven't figured out the details of it, but apparently Haml is the culprit here.
Remove gem 'haml-rails' from your Gemfile if you have it, and replace it with:
gem 'haml', '~> 4.0.0'
Then run bundle update and boot up the Rails server again.