mixpanel gem breaks cucumber tests - ruby-on-rails

i'm using cucumber+capybara to test my app. But after adding mixpanel to my code i've got errors
Mixpanel::ConnectionError at /users =================================== > Could not write to Mixpanel, server responded with 200 returning: '{"status": 0, "error": "distinct_id, missing or empty"}'
how can i fix it?

Related

Where do I find the error log of a Rails app on the production server?

My app is working fine on a local server. After deploying it on production (AWS EC2), I see this "classic" Rails error page:
I thought that the errors are logged to the file current/log/production.log, but when I looked in it, there's no error captured. I can only see there the following:
I, [2019-06-09T12:12:04.353438 #12855] INFO -- : Started GET "/constact-us" for 185.44.76.84 at 2019-06-09 12:12:04 +0000
I, [2019-06-09T12:12:04.355034 #12855] INFO -- : Processing by MyAppSite::SiteController#contact_us as HTML
There's logged accessing the URL, but not the error message. Where do I find it? I added some pure HTML/image to that template, so I think the error must be related to some issue with assets (and precompilation).
However, where do I find the full error message?
I am looking to the config/environments/production.rb file and regarding logs, there's "only" this line:
config.log_level = :info
Any advise how to figure out the error message?
EDIT: I just realized that I also have integrated Rollbar to the app and it hasn't caught the error either.
EDIT 2: error from the nginx log:
2019/06/09 13:47:14 [error] 987#0: *7824941 upstream prematurely closed connection while reading response header from upstream, client: IP, server: www.my_website.com, request: "GET /contact-us HTTP/1.1", upstream: "http://unix:/tmp/unicorn.myapp_production.sock:/contact-us", host: "www.my_website.com
Thank you

Rails rake rollbar:test didn't pass

I was trying to use rollbar gem to monitor error message.
I followed its document.
Add gem 'rollbar', and rails generate rollbar POST_SERVER_ITEM_ACCESS_TOKEN.
(I did changed the POST_SERVER_ITEM_ACCESS_TOKEN to my key)
But after I run rake rollbar:test, it only threw Test error from rollbar:test in dashboard.
Update
initializers/rollbar
Rollbar.configure do |config|
if Rails.env.test?
config.enabled = false
end
In console
rake rollbar:test 16:21:14
Testing manual report...
[Rollbar] Scheduling item
[Rollbar] Sending item
[Rollbar] Success
[Rollbar] Details: https://rollbar.com/instance/uuid?uuid=1f4c4e35-df5f-4606-916d-d97341b01dc7 (only available if report was successful)
Setting up the controller.
Processing...
Started GET "/verify" for at 2016-12-02 16:21:21 +0800
Check your rollbar config, probably it's disabled in development mode.
https://github.com/rollbar/rollbar-gem/blob/master/lib/generators/rollbar/templates/initializer.rb#L7

error in proxy in rubymine

0
votar en contra
favorito
I've tried to run a gem in rubymine and I have the following error:
ERROR: Could not find a valid gem 'rails' (>= 0), here is why: Unable
to download data from https://rubygems.org/ - no such name
(https://rubygems.org/specs.4.8.gz)
Then I configured the proxy like this:
set http_proxy=http://user:pass#serv:port
and I had the following error:
ERROR: While executing gem ... (Net::HTTPServerException) 407 "Proxy
Authentication Required ( Forefront TMG requires authorization to
fulfill the request. Access to the Web Proxy filter is denied. )"
Could you know what can it be?
thank you!
It should be "https://rubygems.org/" instead of "https rubygems.org/" (missing ://). Make sure that you have a proper value for source in Gemfile.

Using ant task in mobilefirst error in wladm cmd

I followed this tutorial:
http://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.appadmin.doc/admin/r_invoking_the_wladm_program.html
I'm trying to enter a command in cmd and tried this:
wladm --url=http://IP:9080 --user=demo --passwordfile=PATH\wladm.config --secure=false show info
I'm getting this error:
Error accessing http://IP:9080/userAndConfigInfo?locale=en_US:
HTTP/1.1 404 Not Found
Now when I enter another command:
wladm --url=http://IP:9080 --user=demo --passwordfile=PATH\wladm.config --secure=false list adapters RuntimeName
I'm getting this error:
Error accessing http://sv591527.ph.sunlife:9080/management-apis/1.0/runtimes/Sun
lifeTestApp/adapters?pageSize=1000000000&locale=en_US: HTTP/1.1 404 Not Found
Anyone have an idea what I'm missing?
The URL should contain the context root of the MobileFirst web application for administration services, that is, should be something like http://IP:9080/wladmin or http://IP:9080/worklightadmin. For more details, please consult the wladm usage documentation http://www.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.appadmin.doc/admin/r_invoking_the_wladm_program.html.

RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request error?

I'm trying to index rich documents but I'm facing some issues. I'm following this link:
http://cbpowell.wordpress.com/2012/09/18/indexing-rich-documents-with-rails-sunspot-solr-sunspot-cell-and-carrierwave-cookbook-style/
$rake sunspot:reindex
rake aborted!
RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request
Error: {'responseHeader'=>{'status'=>400,'QTime'=>29},'error'=>{'msg'=>'undefined field type','code'=>400}}
Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:Article</query></delete>"
Note: Solr we are configured manually (not inside application)
http://archive.apache.org/dist/lucene/solr/4.7.0/
If you are using solr 4.7.0 please pay attention to tika-core-x.x.jar and tika-parser-x.x.jar files. sunspot_cell_jars gem includes outdated version for both of them (check this page www.java2s.com/Code/Jar/t/tika.htm to find correct version for yours configuration)
Also you can try use updated sunspot_cell gem

Resources