Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8854577
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:55:00+00:00 2026-06-14T13:55:00+00:00

I am trying to get gmaps4rails with Active Admin in Rails Rails 3.2.8. I

  • 0

I am trying to get gmaps4rails with Active Admin in Rails Rails 3.2.8.

I have been trying to follow this tutorial but have needed to adapt it as I am using mysql in my stack.

I am not getting any errors (which might help!) but I am also not getting any maps.

My model (location) has the attributes longitude:float, langitude:float and gmaps:boolean

I have added the following to the locations model, which is different to the tutorial:

def location
    [:latitude, :longitude]
end

and this to the active admin locations model, also different from the tutorial:

f.input :location do |o|
           gmaps("markers" => {data: o.to_gmaps4rails}, "map_options" =>  { auto_zoom: false, zoom: 15 })
     end

As far as I can tell (by scanning through the rendered source files) the CSS and JavaScript seem to be loading.

The whole app is available here

Other that those changes, I think I have stuck to the tutorial.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:55:01+00:00Added an answer on June 14, 2026 at 1:55 pm

    I was just working on the same problem and seem to have come up with a solution. If you create a new partial and call it in your active admin model like form :partial = 'partial_name'

    Then in the partial using the

    <%= semantic_form_for [:admin, @model_name] do |f| %>
      <%= f.input #all your other inputs %>
    
      <%= f.inputs "Location" do %>
        <%= gmaps("markers" => {data: @model_name.to_gmaps4rails}) %>
        <%= yield :scripts %>
        <%= f.input :latitude %>
        <%= f.input :longtude %>
      <% end %>
    
    <% end %>'
    

    You will still need to include the gmaps4rails sprockets in your active admin css and js files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to get gmaps4rails to work in a rails 3 project. I have everything
I've been trying to get gmaps4rails working for hours. I think it's the load
Hello everyone I been trying get php uploader working but having a lot of
Trying to get a tab character into a JMenuItem using \t but it's not
Hi am trying get GPS using network provider and GPS provider. but am getting
I am trying get my first simple project in rails to run. I have
I am trying get the Regex right for the following scenario but have some
I am trying get all html links within a string and replace them using
I am trying get all html links within a string and replace them using
I am trying get Struts 2 and Tiles to work and I am using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.