similar to: Rails Assets Best Practices

Displaying 20 results from an estimated 20000 matches similar to: "Rails Assets Best Practices"

2006 Aug 06
0
Best practice: installing plugin assets in rake task or install.rb?
I noticed that a few plugins come with rake tasks to install additional assets. In Rails 1.1.4 there''s a hook file, install.rb, that is run when after the plugin has been installed (edge Rails has uninstall.rb, too). Wouldn''t it be nicer to use this (these) hooks to install (remove) plugin specific files automatically? Preferrably existing (different) files are overwritten
2012 Feb 12
0
Rails reading from wrong assets folder
Hi, I''m having some trouble with the rails on my webhost. Something went wrong when switching from 3.0 to 3.1 and configuring the assets pipeline. Been following the guide: http://guides.rubyonrails.org/asset_pipeline.html#upgrading-from-old-versions-of-rails But it didn''t do the trick. The weird thing is that I now have 2 assets folders (I guess one got generates from rails or
2011 Sep 27
1
Rails 3.1 assets path for video player Flash script 'player.swf'
I was using a Flash video player within a previous Rails version app Moving to Rails 3.1.0 , I dob''t know where I should put the script ... I tried to move it into an app asset sub-directory assets - jwplayer - - player.swf but this raises an error "NetworkError: 406 Not Acceptable - http://localhost:3000/assets/jwplayer/player.swf" player.swf the flash script is given as a
2011 Aug 18
1
Rails 3.1rc6 assets / precompile change
I''m currently using Rails 3.1rc5, and deploy with capistrano. During deploy, I precompile the assets on the server using assets:precompile after deploy:symlink. I noticed that "group :assets" gems in my gemfile were being included in my production application processes (and adding a lot of memory usage), even though they are only used during the deploy. It looks like this
2012 Apr 30
0
Rails 3.1.3 -> 3.2.3 upgrade, assets can't be found
Hello everyone, I''m upgrading one application from Rails 3.1.3 to 3.2.3 and run into a nasty problem that none of the assets are found (everything worked great before upgrade). I''ve investigated for several hours and it seems that the root of the problem is that the order of initializers becomes wrong after initializers.tsort (in railties-3.2.3/lib/rails/ initializable.rb:54).
2012 Jan 03
1
Rails 3.1 assets pipeline issue in production
I am running a jwplayer with an open ads server plugin .. it''s running fine in development, ads are served , but not in production on the remote server... I guess it''s related to the plugin file access ... in development , I wrote in the script : ''plugins'': { "/assets/jwplayer/ova-jw.swf": { "overlays": {"regions": [{
2012 Feb 19
0
Session id unavailable if assets pipeline enabled in Rails 3.2.1
I have a Rails 2.3.2 application I am upgrading to Rails 3.2.1. I am using ActiveRecord::SessionStore connected to an Oracle database using the oracle_enhanced_adapter. On my first attempt (creating a new, default Rails 3 application copying in the application code, and fiddling with routes etc) I found that most things could be made to work, but that: request.session_options[:id] returns
2011 Mar 09
1
Generating Unique Tokens for Assets within Rails Application
I''ve been developing an application in Rails 3.0.3 using Ruby 1.9.2. It is one of my first applications using Rails 3 and I am quite pleased with the progress thus far. However, I am wanting to add a feature that I have thought through, but I am not sure where to really begin. Essentially, I am building a dumping ground for files, much like Dropbox, however this is mostly for personal
2011 Nov 01
1
Rails 3.1, stylesheet assets not being reloaded correctly?
Hi, I''m working on a Rails 3.1 project at the moment and having a hard time getting the stylesheets properly loaded. My application.css.scss looks like this: /* * This is a manifest file that''ll automatically include all the stylesheets available in this directory * and any sub-directories. You''re free to add application-wide styles to this file and they''ll
2013 Jan 21
1
Set asset host port in a way similar to what application does
Concerning http://stackoverflow.com/questions/13266603/rails-how-to-set-port-number-for-the-asset-hosts-in-development I''m setting the full asset hosts in the environment files, being the one in development http://localhost:3000 . But let''s say I restart the application on port 3001. Assets won''t be fetched, and I have to change it accordingly all the time in the
2012 Jan 24
0
PCA for assets based household income analysis (" hetcor" and "princomp")
I am doing Principal Component Analysis (PCA) on assets data for household income prediction. The problem is that the assets data are rank ordered (usually binary ... possess car/don't possess car), so the normal correlation is inappropriate for the calculation of the PCA. Instead one has to use the polychoric correlation coefficient. It uses the "random.polychor.pa" package.
2013 Jul 10
0
ActionView::Template::Error Not a directory vendor/assets/javascripts/ production
Hello, In production environment, I have this error ActionView::Template::Error Not a directory vendor/assets/javascripts/holder.js when in my template I have this line <%= image_tag "holder.js/150x200" %> My production.rb is : Libapp::Application.configure do # Settings specified here will take precedence over those in config/application.rb # Code is not reloaded
2013 May 23
1
rake assets:precompile issue with JS and stylesheets files with similar name
Hi, I''ve got following two files with same names under javascripts and stylesheets directories as: - app/assets/javascripts/test_vendor.js - app/assets/stylesheets/test_vendor.scss Essentially a JS and an stylesheet files with same name. -------------------------------------------------------------- I want these files to be precompiled and served from public directory. Thus I
2011 Nov 18
0
Assets - find a weird behavior recently and I'd like to understand the original issue
Hi the great community of Rails :) Okay... Recently I had a big problem with javascript (JQuery) in one of my Rails 3.1 application. The problem was that the behavior of my javascript animations were acting in a very weird way, and the strangest thing was it happened only in development for the exact same code as the one of the production application. What I tried: (if you''re in a
2014 Feb 18
0
Compiled assets are not found in production mode run locally
I have a strange behaviour with compiled assets when running a simple draft app locally: RAILS_ENV=production rake assets:precompile The aove command generated some css and js with finger printed values: i.e. application-43dcf2bdff355d2c3053e2aade23881a.css application-c67be452a576850d0c11559f908180e3.js etc. Run in production: rails s -e production There are no CSS fiound ! When
2008 Sep 03
1
portfolio.optim and assets with weigth equals to zero...
Hello. I don't understand a particular output of portfolio.optim (tseries). I have 4 assets and the portfolio.optim returns an asset with weight equals to zero. If I do a portfolio.optim with 3 assets, without the asset with weight equals to zero, it returns a completely different result. That's I would expected the same weights as the run with 4 assets. Below the code. Thanks in
2012 Mar 25
1
Sub Directories in the Assets Folder
New to working with Rails assets, and have been having a hard time finding a solution to what I am doing. I have some jQuery files along with css and images, organized into folders based on the feature I am using, all with relative paths. For instance, JqueryFolder will have a js, css, images, etc. inside of itself - all linking to each other. I''m looking to load all of the js, css,
2013 Mar 26
0
Assets compiler, how to copy whole directory to destination
How to instruct assets compiler to include whole directory in public/assets/somedir directory. The thing is with ckeditor which requires language dependent file at runtime. And if it doesn''t find it in assets/ckeditor/lang directory it doesn''t run. I have copied directory manualy for now. But can it be done and how by assets compiler. by TheR -- Posted via
2014 May 31
0
Help me understanding assets path
I've put my favicon into app/assets/images and include in my header <%= favicon_link_tag 'my_favicon.jpg' %> The favicon is correctly recognized by the browser, so it works perfectly. When viewing the source code, I see to my surprise that the following HTML code is generated: <link href="/assets/my_favicon.jpg" rel="shortcut icon"
2011 Mar 16
0
Making Mongrel/WEBRick serve static assets with future expires header
I''m creating a Rails application which will be deployed to desktop machines, running both the webserver and the browser (it''s a test- taking application which needs to be able to run without an internet connection). For this reason, I''ll be running Mongrel or WEBRick, without an Apache/ Nginx in front of it as you would normally do. The browser will access the Mongrel