acts_as_follower undefined method - ruby-on-rails

In my rails app I am using the gem 'acts_as_follower' I have run the generate command, rake db:migrate set-up the user model but when I go onto my localhost it just says undefined local variable or method 'acts_as_followable'
does anyone have any ideas how I could fix this?

Do bundle install and restart your server.

Related

Can't Rake Database "Undefined method "each" For SQLite"

Hello I am just getting started putting up a test database. I am using the preloaded rails environment from digital-ocean if that helps anything.
So I have just cloned my application from github and went rake db:create. When I did that it says there is an undefined method each for SQLite. I am not using sqlite though? I have specified PostgreSQL as the adapter.
I am a noob so sorry If this is a dumb question. Thank you in advance.
Use:
rake db:create
Not
rake:db create
I removed SQLite using gem uninstall sqlite3 then restarted the server. Everything started to work after that.

bundle exec -> undefined method `skip_authorization_check' for SessionsController:Class

I've just installed the 'sidekiq' gem and trying to run the following from the Terminal:
bundle exec sidekiq
When I run this though, I get the following error. This error does not occur when running the Rails server or loading the environment in the console.
undefined method `skip_authorization_check' for SessionsController:Class
It makes me think that the sidekiq script is trying to do something and it can't see that method. But I've not been able to make much progress with this.
Any clues?

Application Error rails app on heroku

I have uploaded my app to heroku, its a simple app to test a login, it uses a gem named sorcery, but when I test it on heroku, I get Application Error
To upload to heroku I only have do this sequence:
git init
git add .
git commit -m "init"
heroku create
heroku push heroku master
heroku rake db:migrate
I get this error:
rake aborted!
undefined method `sorcery' for
#<Rails::Application::Configuration:0x0000000266e660>
)
Please help me, I think that the gem sorcery is causing this problem, but I dont know what to do.
You can see the website here
Does this work on you localhost?
I see form your list of commands that
bundle install
is not there.
Make sure you have
gem "sorcery"
in your gem file
Then do
heroku login
and
bundle install
You'll probably get other errors. Go to Getting Started with Rails 3.x on Heroku and follow the instructions.

rake gems:install throws error

I am trying to install queue-tip on my asterisk server using the following guide:
http://queue-tip.rubyforge.org/install.html
However I am unable to proceed past the following step as it throws this error:
rake gems:install
rake aborted!
undefined method `name' for "abstract":String
Tasks: TOP => environment
Any help please?
To install a gem, use the gem command, e.g. gem install rails. If you're in a Rails 3.x environment, add to the file Gemfile.rb in a format similar to others already included, then run bundle install from your project directory.

rails_sql_views prevents migrations on Heroku

I have a rails app that requires multi-table inheritance for which I am using the CITIER gem which itself requires the rails_sql_views gem to produce database views representing objects.
So far, so good. All this works like a charm on my local machine using sqlite3. When I try to deploy the application to Heroku, however, I am neither able to perform a database migration nor able to access the rails console.
The reason seems to be that the rails_sql_views gem tries to access some methods of PostgreSQLAdapter which are claimed to be non-existent. However, when I check the files of the rails repository, I can find these methods in the code. What is going on here?
When I try to run "heroku run rake db:migrate", I'll end up with the following error trace:
Running rake db:migrate --trace attached to terminal... up, run.1 rake aborted!
undefined method `tables' for class `ActiveRecord::ConnectionAdapters::PostgreSQLAdapter'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/core_ext/module/aliasing.rb:31:in `alias_method_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rails_sql_views-0.8.0/lib/rails_sql_views/connection_adapters/postgresql_adapter.rb:5:in `included'
/app/vendor/bundle/ruby/1.9.1/gems/rails_sql_views-0.8.0/lib/rails_sql_views/loader.rb:12:in `include'
[....]
This looks like an incompatibility between sqlite3 and postgres adapters with that gem. You should try to keep development as close to production as possible. Try installing postgress locally https://devcenter.heroku.com/articles/local-postgresql and see if you get the same error locally. If you do, consider writing a detailed bug report and sending it to the author of the Gem, or attempt to fix it yourself and send a pull request.

Resources