lightbox2-rails | Lightbox2 for Rails asset pipeline | Application Framework library
kandi X-RAY | lightbox2-rails Summary
kandi X-RAY | lightbox2-rails Summary
Lightbox2 for Rails asset pipeline
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of lightbox2-rails
lightbox2-rails Key Features
lightbox2-rails Examples and Code Snippets
Community Discussions
Trending Discussions on lightbox2-rails
QUESTION
I'm trying to implement lightbox2 into a rather simple rails 5 app and seem to be getting the following error:
ActionController::RoutingError (No route matches [GET] "/images/lightbox/bpo.jpg"):
Ive been following steps from: https://lokeshdhakar.com/projects/lightbox2/ & https://github.com/gavinkflam/lightbox2-rails
All images for the Lightbox are located within "images/lightbox" folder & images are properly displayed on the page however upon clicking on an image to enlarge and bring up the Lightbox modal the above routing error is displayed in the logs & no image appears.
...ANSWER
Answered 2019-Feb-23 at 14:10I've never used lightbox2 before but if it's me, I would take 3 different solutions
- change "a" into "div"
- remove href from "a"
- overwrite event handler of lightbox to preventDefault
hope any of those can solve your problem
QUESTION
I have been trying to solve this issue for weeks, but with no succes so instead of looking for the answear in other peoples questions, I thought I should write my own.
The problem is as follows. A couple of weeks ago I finished one of my rails projects, so I pushed the repo to heroku. Everything seemed to work fine, but then I notice that my navbar toogle was not working and my carousel neither. Locally ther work perfectly.
Currently it is hosted on heroku.
These are the things I have tried.
- Assets precompiled and clean
- Installed
gem 'rails_12factor'
- Reordered app.js as follows
ANSWER
Answered 2017-Oct-11 at 23:37Try putting config.assets.debug = true
in your production.rb file and see if that fixes it. I'm guessing there is an error in the middle of your compressed JS file causing the rest of the functions to not be executed.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lightbox2-rails
Add to your Gemfile and install with bundler:
Add to your config/initializers/assets.rb in order to have the images for lightbox precompiled:
Require the modified Lightbox2 javascript file in app/assets/javascripts/application.js:
Require the modified Lightbox2 css file in app/assets/stylesheets/application.css:
Changing default options (Optional)
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page