I did some research to implement logging possibilities in my Rails App.
There are a lot of good blocks and gems description to use Logstash or fluentd to send my logs to ElasticSearch.
But so far I didn't find any documentation using fluentbit.
Did someone have experiences using this and can show a prope and basic way, how to implement it?
I am using either Ruby 2.7.x or Jruby like 9.2.20.0 and the latest Rails 6.1 Version.
Related
I deployed my rails app to google app engine. How can i check or where do i find the logfiles generated by rails? Usually they are located in [appname]/log/production.log
Thanks & regards, Andreas
Take a look at this. To quote from the docs related to Ruby:
App Engine automatically sends these logs to the Cloud Logging agent, and you can view them in the Logs Viewer, on the command line, or programmatically.
Edit: This applies both to GAE Standard and Flexible (previous link).
can anyone help me how to create a web service API in rails 4. I know how create web service API in ruby 1.8.7 and rails 2.3.5 with action web service gem. When I am trying to use https://github.com/datanoise/actionwebservice gem in rails 4, I am getting deprecated errors.I want to upgrade my web service app. Please help me.
Rails-API looks promising, because it will be part of Rails core in Rails 5.
Rails-API
Rails-API is a subset of a normal Rails application, because API only applications don't require all functionality that a complete Rails application provides. so, it compatible well with old Rails versions. I don't know compatibility exactly, but I'm using it with Rails 3.2.x
There are another proper framework for this purpose, for example, Sinatra, Grape, but If you familiar with Rails, Rails-API will be the best choice.
Actionwebservice is long deprecated, in favour of REST API's. At my previous job we used a fork of actionwebservice in a rails 3 project.
Since there is no maintainer anymore for the actionwebservice gem, that fork never got merged back. If you check the fork history, a lot of people are fixing and partially updating it, but it is scattered all over the place.
Afaik none of the forks were updated to use rails 4. But using a rails 3 fork might just work.
If you really need to build a SOAP API server with Rails, imho your best option is to take a look at Wash-out, but you will have to re-write your API code.
I am looking for an open source web analytic for my Rails 4.2 app, so after some research I found that piwik fit my needs. can I use "piwik" with postgresql ? it seems that they only support mysql but I am not sure if it still true at this moment!
also I've found a post about how to integrate it within Rails here but they use piwik_analytics which is a Gem for Ruby on Rails 3.x and may not work with 4.2 !
All the information I've found are a little outdated and I am not sure if there is a way to make it work with my current requirements. any help please ?
Piwik supports only MySQL, that's true
You don't need any gem because Piwik just needs to load some Javascript that needs to be embedded into your layout/views. The Rails app doesn't directly interact with it, only your visitors' browser. Which also means that it shouldn't matter whether it supports Postgres because it will most likely run on another machine as your Rails app.
Edit:
Regarding the gem you mentioned: I looked at it, too, when adding Piwik analytics to my app, but in the end went with writing the few required lines of JS myself.
This might be an incredibly simple question, but I'm writing my first Rails engine (Rails 3.2) and this is all pretty new.
My engine is meant to Email Delivery (do the sending and the logging of messages) for a few of my older Rails apps (3.0.11, 2.3.15, 2.3.14). I thought I would be able to just create this application and mount it to the older apps.
Simply put, must I upgrade the older apps before being able to use an engine written in a new version?
I went on #rubyonrails on irc and got a bit more information.
"You should be able to use new engines in older apps as long as you don't use any APIs not in the new version you'll be fine."
and
If the engine requires a different gem version than your application does: "You'll have to resolve those issues manually"
That should get me started....
I have a RoR 2.3.8 application running on EC2, I am using engineyard. which is prooved to be significantly costly to me. I want to migrate to GAE.
Can anyone please tell me the steps and points i suppose to remember while doing this.
You can check the appengine-jruby project or an another way is to use heroku.
Currently GAE doesn't support Ruby. It only supports Java and Python. Check the link for more info languages supported by GAE.
But i believe , if you convert your rails app to JRuby, then you can run it in GAE. Because JRuby runs on JVM. I have read the articles long before how to run JRuby apps in GAE. you can google it.
GAE supports only Python and Java. OK there was Go! added recently. So, Rubby is not on the list unfortunately.