Giter Site home page Giter Site logo

autocomplete_rails's People

Contributors

cyberdeck avatar tomichj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

autocomplete_rails's Issues

Wrong file and directory permissions for gem?

After a clean install for Rails 5.1, I cannot use the autocomplete method within my custom controllers. Neither with bin/rails c I am able to find any traces of the AutocompleteRails::Controller:

[1] pry(main)> require 'autocomplete_rails'
LoadError: cannot load such file -- autocomplete_rails
from /var/lib/gems/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `require'
[2] pry(main)> ls AutocompleteRails::Controller
NameError: uninitialized constant AutocompleteRails

However, after changing the gem files for all users to be readable with

# sudo chmod o+r -R -- /var/lib/gems/2.3.0/gems/autocomplete_rails-0.3.0

I can load it successfully within the console:

[1] pry(main)> require 'autocomplete_rails'
=> true
[2] pry(main)> ls AutocompleteRails::Controller
constants: ClassMethods
AutocompleteRails::Controller.methods: included

To be able to use it within my own controllers, I need to require it with an initializer in my config directory, e.g. creating a file config/initializers/autocomplete.rb:

require 'autocomplete_rails'

Now, I am able to use the autocomplete method within my controller.

Is the current gem broken or did I miss something in regard to the installation instructions?

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.