Ruby on Rails Monday, February 29, 2016

On 29 February 2016 at 13:25, fugee ohu <fugee279@gmail.com> wrote:
>
>
> On Monday, February 29, 2016 at 6:44:21 AM UTC-5, Colin Law wrote:
>>
>> On 29 February 2016 at 09:39, fugee ohu <fuge...@gmail.com> wrote:
>> > Using require statements in application.js should reference files
>> > located
>> > where?
>> > //= require bootstrap-sprockets
>> > where is bootstrap-sprockets supposed to be located?
>>
>> If you have included the appropriate gem in Gemfile then you don't
>> need to put it anywhere.
>>
>> Colin
>>
>> >
>> > --
>> > 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-ta...@googlegroups.com.
>> > To post to this group, send email to rubyonra...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/rubyonrails-talk/e765dfe2-3dad-459e-adfc-92da95a65d80%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>
>
> Thanks, Colin So then why require them if they're all "gemmed out"? I'm
> having trouble getting data-description to work in bluimp-image-gallery If
> you read the docs it can be found under Additional Gallery Elements The
> docs say to include links to javascript scripts at the bottom of my view
> using <script src= ... So that's what I did Seemed the javascript in
> question wasn't working so when I asked for help someone asked me if I was
> using the asset pipeline and then if i'm using the asset pipeline why am i
> putting the links to javascript scripts <script src= ... in my views and the
> discussion ended up concluding just about there after trying to get
> clarification Here's a gist of the files involved
> https://gist.github.com/mices/f9516cb3ea9da3f3c690 ~ thanks, fugee

Not sure what you mean by gemmed out.
I believe that you should either require it in application.js (in
which case it will be compiled in with the other js files) or
specifically include it in the page using the script tag. The former
is generally preferred as it means the browser should only load the js
once for the whole website. I have not used this particular library
though so don't know whether there is a reason why it should be
explicitly loaded in the page.

Google found this which may be helpful
http://stackoverflow.com/questions/21519040/rails-4-bootstrap-set-up-assets

Colin

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLusqEBO38xn%2BdVC1fJVZcNCt4_rCpG9M2KeB4vbxy%2Bh5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment