[Rails] Locusts in Africa

2020-02-14 Thread David Hughes
Dear Ruby community 

I am a scientist at Penn State and the United Nations. We have a Platform 
called PlantVillage that is a public good with a backend built on RoR with 
various apps farmers use around the world to get help. The reason these 
farmers (e.g. in Kenya) would use the tool is that they dont have access to 
human experts who can help them know the problems in their field 
(pests/climate change stress). You can read our blogs here 
https://plantvillage.psu.edu/blogposts

I wrote back in 2018 to this group to ask about getting your help. Many of 
you were very keen on helping. THANKS!! 

I didnt follow up as I am not a coder. I pay a team in India to do this.  
So, it was just easier to keep with them. I didnt even know where to start 
in sharing the code on GitHub. 

Now in recent weeks Ruby experts at Penn State (who built ScholarSphere 
https://github.com/psu-stewardship/scholarsphere) have looked at our code 
and it is very bad! Rubocop showing errors off the charts and no 
tests/commit. 

It needs your help and we are actively trying to make sure we dont have any 
privacy issues so we can open source it. 

I am reaching out now as we have an extremely urgent situation though. You 
may have seen the news about Locust swarms in East Africa? They are the 
worse in 75 years

According to the UN, 19 million people are in immediate danger. They are at 
Level 3 (crisis). Since we can expect hotter, drier weather in some 
affected regions in the coming months (low crop outcome) the addition of 
locusts in potentially a famine. 

Here is an article today https://www.bbc.com/news/world-africa-51501832 The 
video is informative 

They are mostly in Kenya where control is possible. But we need lots of 
people out there with phone use our app and reporting sitings. Currently, 
they use WhatsApp but since that is private we cannot get the GPS 
coordinates of the locations. 

The Indian team I employ built an app. But I am sure it has problems and if 
we have thousands of users it could fail. 


Here is the apk file of the app 
https://drive.google.com/file/d/1nAvTolDEz48mPLtIPO6abumW6KQAM-00/view?usp=sharing

It is super simple: It must do two things 


1) Allow users to upload images/videos from which United Nations Staff can 
determine the location and stage of locust swarms

2) Enable app users to have a free-ranging chat function. There should be 
two chat channels: general (any users of apps) and admin (just select). 


One of the problems we have is the code base for the locust app is tied to 
the rest of out platform and apps. So, there are security issues if user 
names and passwords etc. 

Your coding skills could save lives here: that is not an exaggeration! If 
you can help that would be wonderful. I am very new at this so dont know 
your culture but am willing to learn. We have thousands of agriculture 
experts and farmers working with us. We could have thousands of coders like 
you. So, if you can be patient and help me build this we can create a 
community using the skills you all have helping the poorest people on our 
planet cope with stresses like locusts and climate change. 

Fair warning! If you jump in the code won't be pretty and documented. I can 
incentivize you with some swag :) 

I am trying to hire Ruby people at Penn State so will have an advert soon. 


Thanks so much for any help 

david 


On Nov 13, 2018, at 11:22 AM, David Hughes  wrote:

Hi all
I am a scientist at Penn State University and the United Nations Food and 
Agricultural Organisation. I work to help poor farmers in Africa and 
elsewhere grow more food by combatting pests and diseases.  There are two 
ways we do this: an Android app that runs TensorFlow object detection 
offline inside the food without a web connection (see here 
). The other way is through an 
Open Access library on content called PlantVillage with a QA forum. This 
platform is 6 years old and had around 8 million visitors with around 
80-100k new month.  https://plantvillage.psu.edu/  The platform is RoR

All of this is a public good, aimed at helping poor farmers who typically 
earn a few dollars/day. I am spending a lot of money on developers (in 
India) and  I raise money with grant writing etc. I am having issues around 
quality and cannot afford the necessary QA. 

I was wondering if I open sourced the site would your community be 
interested in helping? We work directly with farmers and through the United 
Nations. It really can be a very impactful project 

My goal is an AI-driven platform that is the number 1 resource in the world 
for smallholder farmers around the world. All ad free and without haresting 
their data to sell 

I would love to hear your views on whether open sourcing would be a good 
idea and would people  join in?

Thanks 

David 



David,

Before you opensource the project, you will want to have a Senior RoR 
developer comb through to make sure the authentication credenti

Re: [Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread Nicholas Schwaderer
Fugee,

Replace:

“remote: false” with “local: true” and tell me if that works for you.

Source: I wrote the docs on form_with.

-Schwad

Sent from my iPhone

> On 14 Feb 2020, at 10:52 pm, fugee ohu  wrote:
> 
> 
> 
>> On Friday, February 14, 2020 at 12:04:55 PM UTC-5, Walter Lee Davis wrote:
>> Is your form set to the default of an Ajax submission, or did you add the 
>> configuration flag to the form_with method call that makes it actually 
>> redirect? If this was a redirect, the header would be 301, not 200. 
>> 
>> Walter
>> 
>>> On Feb 14, 2020, at 9:59 AM, fugee ohu  wrote:
>>> 
>>> 
>>> This is a redirect from my log, but page doesn't change I'm still on the 
>>> same page containing the form I submitted
>>> 
>>> 127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /artists/72/press_releases 
>>> HTTP/1.1" 200 2542
>>> http://localhost:3000/artists/72/tours/1 -> /artists/72/press_releases
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Ruby on Rails: Talk" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to rubyonra...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/rubyonrails-talk/be527a35-e686-4968-8849-ca05ecfc2491%40googlegroups.com.
> 
> Well I hope you're still with me on this cause I solved it and I don't have 
> anyone else to tell For some reason I had commented out `gem turbolinks`  in 
> my Gemfile I'm upgrading all my apps to rails 6 and really to webpacker I 
> remember reading somewhere the new way of doing things is to not use 
> turbolinks I don't remember where 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/2aab187e-810f-4122-8318-fd6ced48d405%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/4724AFED-8F0D-4A86-A3FC-39A4E53AFCDD%40gmail.com.


Re: [Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread fugee ohu


On Friday, February 14, 2020 at 12:04:55 PM UTC-5, Walter Lee Davis wrote:
>
> Is your form set to the default of an Ajax submission, or did you add the 
> configuration flag to the form_with method call that makes it actually 
> redirect? If this was a redirect, the header would be 301, not 200. 
>
> Walter
>
> On Feb 14, 2020, at 9:59 AM, fugee ohu > 
> wrote:
>
> 
> This is a redirect from my log, but page doesn't change I'm still on the 
> same page containing the form I submitted
>
> 127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /artists/72/press_releases 
> HTTP/1.1" 200 2542
> http://localhost:3000/artists/72/tours/1 -> /artists/72/press_releases
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonra...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/be527a35-e686-4968-8849-ca05ecfc2491%40googlegroups.com
>  
> 
> .
>
>
Well I hope you're still with me on this cause I solved it and I don't have 
anyone else to tell For some reason I had commented out `gem turbolinks`  
in my Gemfile I'm upgrading all my apps to rails 6 and really to webpacker 
I remember reading somewhere the new way of doing things is to not use 
turbolinks I don't remember where 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/2aab187e-810f-4122-8318-fd6ced48d405%40googlegroups.com.


Re: [Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread fugee ohu


On Friday, February 14, 2020 at 12:04:55 PM UTC-5, Walter Lee Davis wrote:
>
> Is your form set to the default of an Ajax submission, or did you add the 
> configuration flag to the form_with method call that makes it actually 
> redirect? If this was a redirect, the header would be 301, not 200. 
>
> Walter
>
> On Feb 14, 2020, at 9:59 AM, fugee ohu > 
> wrote:
>
> 
> This is a redirect from my log, but page doesn't change I'm still on the 
> same page containing the form I submitted
>
> 127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /artists/72/press_releases 
> HTTP/1.1" 200 2542
> http://localhost:3000/artists/72/tours/1 -> /artists/72/press_releases
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonra...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/be527a35-e686-4968-8849-ca05ecfc2491%40googlegroups.com
>  
> 
> .
>
>
 respond_to do |format|
  if @press_release.save
format.html { redirect_to 
user_artist_press_releases_path(artist_id: params[:artist_id]), notice: 
'Press release was successfully created.' }
format.json { render :show, status: :created, location: 
@press_release }
  else
format.html { render 'user_press_releases/_form'}
format.json { render json: @press_release.errors, status: 
:unprocessable_entity }
  end
end

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/87ab8278-a0b0-467c-8cce-3af53460643e%40googlegroups.com.


Re: [Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread fugee ohu


On Friday, February 14, 2020 at 12:04:55 PM UTC-5, Walter Lee Davis wrote:
>
> Is your form set to the default of an Ajax submission, or did you add the 
> configuration flag to the form_with method call that makes it actually 
> redirect? If this was a redirect, the header would be 301, not 200. 
>
> Walter
>
> On Feb 14, 2020, at 9:59 AM, fugee ohu > 
> wrote:
>
> 
> This is a redirect from my log, but page doesn't change I'm still on the 
> same page containing the form I submitted
>
> 127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /artists/72/press_releases 
> HTTP/1.1" 200 2542
> http://localhost:3000/artists/72/tours/1 -> /artists/72/press_releases
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonra...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/be527a35-e686-4968-8849-ca05ecfc2491%40googlegroups.com
>  
> 
> .
>
> , 
I never heard of a configuration flag in a form to cause a redirect, I'm 
redirecting from a post action in a controller

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/58dc663c-c96b-467a-b519-a284edc53456%40googlegroups.com.


Re: [Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread fugee ohu


On Friday, February 14, 2020 at 12:04:55 PM UTC-5, Walter Lee Davis wrote:
>
> Is your form set to the default of an Ajax submission, or did you add the 
> configuration flag to the form_with method call that makes it actually 
> redirect? If this was a redirect, the header would be 301, not 200. 
>
> Walter
>
> On Feb 14, 2020, at 9:59 AM, fugee ohu > 
> wrote:
>
> 
> This is a redirect from my log, but page doesn't change I'm still on the 
> same page containing the form I submitted
>
> 127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /artists/72/press_releases 
> HTTP/1.1" 200 2542
> http://localhost:3000/artists/72/tours/1 -> /artists/72/press_releases
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonra...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/be527a35-e686-4968-8849-ca05ecfc2491%40googlegroups.com
>  
> 
> .
>
>
<%= form_with model: @press_release, url: 
create_user_tour_press_release_path(artist_id: @artist.id, tour_id: 
@tour.id), remote: false do |f| %>
<%= f.hidden_field :artist_id, value: @artist.id %>
<%= f.hidden_field :tour_id, value: @tour.id %>

<%= f.submit 'Create press release' %>

<% end %>
 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/b9b8c365-b79c-470b-aff1-a3c1d3b9fe09%40googlegroups.com.


Re: [Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread Walter Lee Davis
Is your form set to the default of an Ajax submission, or did you add the 
configuration flag to the form_with method call that makes it actually 
redirect? If this was a redirect, the header would be 301, not 200. 

Walter

> On Feb 14, 2020, at 9:59 AM, fugee ohu  wrote:
> 
> 
> This is a redirect from my log, but page doesn't change I'm still on the same 
> page containing the form I submitted
> 
> 127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /artists/72/press_releases 
> HTTP/1.1" 200 2542
> http://localhost:3000/artists/72/tours/1 -> /artists/72/press_releases
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/rubyonrails-talk/be527a35-e686-4968-8849-ca05ecfc2491%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/E0E40135-7799-48A5-B2B9-1F6ACF93981C%40wdstudio.com.


[Rails] redirect shown in log, but browser not redirecting

2020-02-14 Thread fugee ohu
This is a redirect from my log, but page doesn't change I'm still on the 
same page containing the form I submitted

127.0.0.1 - - [14/Feb/2020:11:55:46 EST] "GET /artists/72/press_releases 
HTTP/1.1" 200 2542
http://localhost:3000/artists/72/tours/1 -> /artists/72/press_releases

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/be527a35-e686-4968-8849-ca05ecfc2491%40googlegroups.com.


[Rails] Looking for clients

2020-02-14 Thread Asad Abbas
Looking for clients.I have a team of Ruby on Rails developers with experience 
and can work on any kind of project.Email me for queries.I am based in Michigan.
Email:achev...@emich.edu

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/d350fc55-7627-4990-87dc-6a2197065821%40googlegroups.com.