Closed Rukenshia closed 10 years ago
I had a weird issue when I tries to use bootstrap development CSS and javascript. When it was minified by asset-pipeline it all ended up on one line and some of the styles, including extra ones I added that ended up near the bottom weren't applied. I did a quick search and think browsers might only process up to a certain point on one line. When I give it the production (already minified version) it works fine (and that version is already split onto several lines). It now works so that's the only conclusion I could come to.
If this is the case would it be possible for asset-pipeline to insert line breaks automatically at suitable points?
Cheers, Tom
On 14 Jun 2014, at 10:18, "Jan Christophersen" notifications@github.com wrote:
Everything works fine locally. But when trying to use it on our server, the pipeline does not seem to work. I've browsed various forums to find the issue, but the solutions did not work for me. asset-pipeline/config.php is unmodifed.
In bootstrap/start.php:
$env = $app->detectEnvironment(array(
'local' => array('http://localhost'), 'production' => array('http://lcweb.vega.uberspace.de'),
)); — Reply to this email directly or view it on GitHub.
I'm not sure if you've got that config right anyway. If you run "php artisan env" locally and on the server does it return the correct name?
On 14 Jun 2014, at 10:18, "Jan Christophersen" notifications@github.com wrote:
Everything works fine locally. But when trying to use it on our server, the pipeline does not seem to work. I've browsed various forums to find the issue, but the solutions did not work for me. asset-pipeline/config.php is unmodifed.
In bootstrap/start.php:
$env = $app->detectEnvironment(array(
'local' => array('http://localhost'), 'production' => array('http://lcweb.vega.uberspace.de'),
)); — Reply to this email directly or view it on GitHub.
php artisan env outputs the correct environment
So it might be the same issue I had then. If you look at the compiled js and css file on the production site are there any really long lines?
Well, the problem is that there are no files. When I manually access /assets via the URL, it gives me error 500.
It should appear wherever you have
<?= stylesheet_link_tag([path to manifest]) ?>
<?= javascript_include_tag([path to manifest]) ?>
in your view.
If you view page source are they not there?
It links to assets/application.css, but when I open that file, I get the internal server error (http://puu.sh/9t5eW/85425522de.png)
Have you got your mod_rewrite set up correctly?
Try going to site.com/index.php/assets/application.css . Does that work?
Try going to site.com/index.php/assets/application.css . Does that work?
that works. For the .htaccess, I've put in the content for "Pretty URLs" from the Laravel page:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
I've found the issue now. With this .htaccess it works:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
Thanks for your help.
Everything works fine locally. But when trying to use it on our server, the pipeline does not seem to work. I've browsed various forums to find the issue, but the solutions did not work for me. asset-pipeline/config.php is unmodifed.
In bootstrap/start.php: