Git Product home page Git Product logo

locomotive_plugins's People

Contributors

alexsanford avatar greeneca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

locomotive_plugins's Issues

Production ready

Have you used this gem in a production environment. Will the changes to locomotivecms v3 change this gem structure?

Connetion refused error with Rest api client in new plugin code

Hi
I'm coding a plugin with colibri-software's plugin supported engine & inside it i'm using a restful api client for interacting with locomotivecms web service but right at starting , web server (puma) encounter to this error:

! Unable to load application: Errno::ECONNREFUSED: Connection refused - connect(2)
/home/kwair/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:763:in `initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)

I use httparty & rest-client and both of them have this problem. another thing that i have to mention is there is not any problem in shell and through curl , httparty , rest-client & also Advanced Rest client extention of chrome every thing works fine.
in my plugin at first i include this items:

require 'locomotive_plugins'
require "PLUGIN_NAME/version"
require 'uri'
require 'httparty'
require 'locomotive/mounter'

and then code my client same Didier's code sample at (https://gist.github.com/did/725202d5f4417cbbbc72/revisions) this way:

$api_base_url = "ADDRESS"
$api_key = "MY API CODE"
Locomotive::Mounter::EngineApi.set_token(uri: "http://#{$api_base_url}/locomotive/api", api_key: $api_key)
attributes = {
title: 'Hello world',
content: 'Lorem ipsum'
}
query = { query: { 'content_entry' => attributes } }
response = Locomotive::Mounter::EngineApi.post("/content_types/posts/entries.json", query)
if response.success?
puts "article created"
else
puts "failed to create an article"
end
Another official code sample with get & put also encountered to this error.
I test both localhost on my laptop(linux mint 17) and also domain name on my server(centos6) for $api_base_url.
please advice me to pass this big problem.

Thanks

Is ruby 1.9 absolutely necessary?

Hello,

This gem restricts ruby version to 1.9.
I am currently developing a rails 3.2 / ruby 2 locomotive_cms app...
Is 1.9 an absolute necessity?

Thank you,

Mark

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.