public_activity | Easy activity tracking for models - similar to Github | Networking library
kandi X-RAY | public_activity Summary
kandi X-RAY | public_activity Summary
Easy activity tracking for models - similar to Github's Public Activity
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of public_activity
public_activity Key Features
public_activity Examples and Code Snippets
Community Discussions
Trending Discussions on public_activity
QUESTION
I updated my ruby to 3.0.0 but for some reason now my application doesn't work. I have searched online for different answered but I cannot find anything. This error has gotten me going crazy now. Here is what happens.
When I do bundle update I get:
...ANSWER
Answered 2021-Feb-14 at 10:52Currently Ruby 3.0 is not supported with Rails, as there will be next release for Rails. You can do following and it works by installing dev branch of ruby 3. I used ruby 3.1.0dev (2021-02-14T05:09:08Z master ff527e7e32) [x86_64-darwin19]
Following commands are with RVM you can use same with other softwares I tried by installing
QUESTION
I am using the public_activity gem, rails 6.0.3.2, & ruby v2.71.
On the page that lists the tracked activities, I want to place a Destroy button for each record in the list of records. I have done so with the code shown below. However, I get a routing error. The route rails is looking for is
...ANSWER
Answered 2020-Aug-20 at 05:41Rails encourages restful resources. Typically I would do something like this in my routes.rb file.
QUESTION
I am getting a mystifying error when trying to access Questions#Show. Anytime I redirect to the View, I get a 500 internal server error. According to my server trace, the issue is in the Questions controller in 'set_question'
...ANSWER
Answered 2020-Feb-03 at 18:22Apparently, there is nothing wrong with your set_question
method. The error says: TypeError - can't quote Rack::Session::SessionId:
and that is happening in impressionist :actions => [:show], unique: [:session_hash]
.
I haven't used this gem so can't exactly tell you how to counter that error but to prove my point, if you comment this line (line 3) in your controller, it will work.
You need to read more about implementing this gem to resolve it.
QUESTION
I have tried everything and nothing seems to be working. could one kindly advise how i can rectify this issue
error message:
...ANSWER
Answered 2018-Jul-08 at 02:54Have you run rails g foundation:install
after upgrading foundation-rails to a new major version? I lost a lot of time on this same issue today until I realized that the new major version shifted the structure around. Running the installation command (and figuring out what conflicts it should override) fixed it for me.
QUESTION
Trying to run rake assets precompile with production mode as follows.
rake assets:precompile
It is working fine for ubuntu 14.04 (32 bit) and 16.06(32 bit.) But getting Load Error on 16.04(64 bit) in aws ec2.
Please help me regarding this.
Thanks in advance.
Here's my full stack trace
...rake aborted! LoadError: incompatible library version - /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/nokogiri-1.8.2/lib/nokogiri/nokogiri.so /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:inload_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/nokogiri-1.8.2/lib/nokogiri.rb:32:inrescue in ' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/nokogiri-1.8.2/lib/nokogiri.rb:28:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:inload_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/loofah-2.2.2/lib/loofah.rb:3:in' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inblock in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/rails-html-sanitizer-1.0.4/lib/rails-html-sanitizer.rb:2:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:inload_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers/sanitize_helper.rb:2:in' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inblock in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers.rb:58:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers.rb:4:in' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers.rb:3:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:inload_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/base.rb:5:in' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inblock in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/public_activity-1.5.0/lib/public_activity/utility/view_helpers.rb:25:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/public_activity-1.5.0/lib/public_activity/utility/view_helpers.rb:2:in' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inblock in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/public_activity-1.5.0/lib/public_activity.rb:68:in
' /home/ubuntu/learnmusicco/config/application.rb:7:in' /home/ubuntu/learnmusicco/Rakefile:4:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/rake-12.3.1/exe/rake:27:in `'Caused by: LoadError: cannot load such file -- nokogiri/2.3/nokogiri /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:inload_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/nokogiri-1.8.2/lib/nokogiri.rb:30:in' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inblock in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/loofah-2.2.2/lib/loofah.rb:3:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:inload_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/rails-html-sanitizer-1.0.4/lib/rails-html-sanitizer.rb:2:in' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inblock in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers/sanitize_helper.rb:2:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:inload_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers.rb:58:in' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers.rb:4:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers.rb:3:in' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inblock in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/base.rb:5:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:inload_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/public_activity-1.5.0/lib/public_activity/utility/view_helpers.rb:25:in' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/public_activity-1.5.0/lib/public_activity/utility/view_helpers.rb:2:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:inrequire' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:inload_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/public_activity-1.5.0/lib/public_activity.rb:68:in' /home/ubuntu/learnmusicco/config/application.rb:7:in
' /home/ubuntu/learnmusicco/Rakefile:4:in' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/rake-12.3.1/exe/rake:27:in
'
ANSWER
Answered 2018-Apr-30 at 13:44You can try running gem pristine --all
to automatically uninstall and reinstall all installed gems in the current environment. That might sort out your issue.
If that doesn't work, try running rm -rf `rvm gemdir`/bundler/gems
to forcibly remove all of your gems and then try another bundle install
.
QUESTION
I have a query that looks like this
...ANSWER
Answered 2018-Sep-08 at 08:41You can use key in order to fetch integer, here is an example:
QUESTION
for some reason votes are counted twice each time a user votes. I can't identify where the error is. See screenshot for duplicate countIt seems like im firing double jquery requests but I don't know which to remove. rails-jquery gem or jquery in application.js
show.html.erb
...ANSWER
Answered 2018-Sep-04 at 20:32Are you using the rails jquery gem and also adding the code in application.js
? It sounds like your Rails JS is being loaded twice and double-submitting your AJAX form.
Check your app logs for duplicate requests to confirm.
QUESTION
This might sound kind of weird, because if you delete an element from some_array, it presumably disappears from memory. But in some cases it would be good to get the last item that was deleted, e.g. when keeping track of the last user someone unfollowed (i.e. deleted from their following array) and rendering a message like 'Bob has stopped following Smith' in the view. I'm not sure what method would accomplish that though, hence the question.
Edit: Storing the item in an instance variable before deleting wouldn't help I think, because instance variables only exist in a single controller action.
Here are some code snippets using the public_activity gem:
...ANSWER
Answered 2018-Aug-16 at 18:30I can't think in a method that deletes the last element and don't return it...
If you do:
var = ary.pop
will remove the last element and return it and you can save var
in another table or whatever...
If you want a more robust solution you can search about papertrail gem.
QUESTION
I install Ruby On Rails on Ubuntu 18.04 using RVM. ruby -v : 2.4.0 rails -v : 5.1.3
I try to run "bundle install" command, I getting below error. please provide me best solution for this.
Could not verify the SSL certificate for https://rails-assets.org/. There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see 'bit.ly/ruby-ssl'. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Gemfile
...ANSWER
Answered 2018-Aug-03 at 11:29Today I had the same problem with one of our apps. We were using rails-assets-tether
gem from https://rails-assets.org. We notice that the same gem is available in the main repository (https://rubygems.org). The solution was to remove source
block from the Gemfile
.
I think that if you need those gems, then you have to wait for the certificate to be renewed (by website owners) or find an alternative source of those gems.
Update:
You can replace https://rails-assets.org with http://insecure.rails-assets.org. Please remember to switch back to https endpoint after this issue has been fixed
QUESTION
I have a Rails4 app with active_admin
for admins only.i have been using it for quite a long time and has customised it to the way i want and it has always worked but now , it is this little weird issue which i am unable to resolve.
My observation---
my layout has active_admin.html.erb
and application.html.erb
.When i rename my active_admin.html.erb or delete it..the custom action works and renders properly but other pages shows up double content rendering containing of two headers,body and footers, but when i keep the admin layout everything works, but the custom action renders blank layout.
i have a custom action in my controller block inside my admin/hall.rb
model, which is also getting executed as per the server logs which also includes the active_admin layout too BUT on the screen , i cannot see any layout and its just blank but when i use application layout explicitly in the controller block, it works.
ANSWER
Answered 2018-Apr-01 at 11:35Well, now i know what was the reason.Looking through the logs clearly mentioned something about the layout and when i searched the code, i founded out that there was a code to override the BaseController of ActiveAdmin.i removed that code now and now its working the way i want.i am sharing the code below that was causing the problem...
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install public_activity
By default public_activity uses Active Record. If you want to use Mongoid or MongoMapper as your backend, create an initializer file in your Rails application with the corresponding code inside:.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page