Git push is not pushing css to Heroku - css

I am working on my first rails app. I have deployed it on heroku, git push is not pushing the css files/settings, what do i do? What could have gone wrong? (css is working locally)
EDIT: This is the output of cat .gitignore
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp

Related

Wordpress path in bash script point to symlink?

I have a bash script on Ubuntu server that is used to do database backups via WP-CLI and use Dropbox Uploader to backup to Dropbox. The script has been working for years on our sites that don't use the Roots Bedrock stack. We recently started use the Bedrock Stack and Capistrano for deploys, and now I want to modify my script to backup databases on these sites. The problem lies in it appears, bash scripts don't understand symlinks for Wordpress path directive. With the Bedrock Stack and server setup, the public directory is a symlink of ~/current/web. Current is the symlink that Capistrano updates to point to the current revision directory. Anyone know how to modify my script to work with symlinks? Here is the script:
#!/bin/bash
# Script to create compressed backup archive of database.
# Set the date format, name, and directory for backups.
NOW=$(date +"%Y%m%d-%H%M")
BACKUP_DIR="/srv/users/serverpilot/apps/backup/public/site"
WP_PATH="/srv/users/serverpilot/apps/site/public"
# MySQL database names
DB_NAME="site_staging"
DB_FILE="site_staging_db_$NOW.sql"
DB_FILEGZ="site_staging_db_$NOW.sql.gz"
# Create the archive and the MySQL dump
wp db export --add-drop-table --path=$WP_PATH $BACKUP_DIR/$DB_FILE
gzip $BACKUP_DIR/$DB_FILE
bash /srv/users/serverpilot/./dropbox_uploader.sh upload $BACKUP_DIR/$DB_FILEGZ /site/
You can use readlink to resolve symbolic links, so in your case you could do something like this:
#!/bin/bash
# The symlinked directory you need to back up
symlink_dir="/srv/users/serverpilot/apps/site/public"
# Set $BACKUP_DIR as the resolved symlink
BACKUP_DIR=$(readlink -f "$symlink_dir")
# Use the absolute path in your backup script
echo "$BACKUP_DIR"
The manpage for readlink outlines a range of other output options.

Laravel Homestead setup but does not sync hidden files

Hi I've setup Homestead correctly but when I ssh into my Vagrant instance I can see all my files just not the hidden ones (.env, .git, .gitignore are missing). I'm trying to run webpack-dev-server within my instance and it needs my .env file to run. Is it normal that hidden files are not synced?
My .yaml file:
Hidden files don't show when using the ls command (which I guess is what u're doing). They are still there, however. You can try something like nano .env and you'll see that you can edit your env from the console :)
Another command you could use is ls -a, which should show all files regardless of whether they're hidden or not.

.gitignored files still shown in RStudio

I added the folder .Rproj.user to .gitignore. However, some files contained in it still show up (see screenshot). Any ideas what can I do about it?
Update
No changes after adding .Rproj.user/**
First of all your files are already committed so you have to remove it from the repo:
# Once you add files to git, it will keep tracking them,
# so we have to delete them and commit your deletion
git rm -r --cached .Rproj.user/**
# Commit the deleted files
git commit -m "Removed files...."
# now add it to the `.gitignore` and the files will be ignored
echo '.Rproj.user/**' > .gitignore
You need to mark it as folder.
In order to do so add the 2 ** as described above
P.S.
Here is a cool hook which will block that kind of files to be added when you try to push them to the server.
What are some more forceful ways than a .gitignore to keep (force) files out of a repo?

phonegap build + phonegap-cli + ionic icons

I am pretty sure what I am trying to accomplish is kind of extreme.. no wait, it isn't!
I just need to get the ionic resources+phonegap-cli+phonegap build combo right.
Now, here's the problem.
No matter how hard I try (because I probably am trying hard and wrong ^^ ) I can't get an ios build to show the icon files I am submitting to phonegap build. But I am beginning to consider the fault not entirely on pg:build side.
I have a root folder, with an /app application and a /resources folder. The latter is generated by ionic resources.
Now when I build for phonegap remote I have this structure in a /pgbuild folder I create ad hoc:
/resources
/www
The config.xml (which is in the main project root folder) contains the following entries:
(source: cloudfront.net)
Here's my ipa package contents:
(source: cloudfront.net)
Which is more or less what specificated in the phonegap build docs. In the docs there is no way I found to understand to which path these src are relative. To the root of the zip? to the root of the www? I've tried also to move /resources to /www, to no avail.
I've tried pretty every combination of folders and src, but I am missing something because the info.plist contains only:
CFBundleIconFiles = ( "icon.png", "icon-60.png", "icon-60#2x.png", "icon-76.png", "icon-76#2x.png", "icon-60#3x.png" );
which is weird because these icons are correct :) except for icon.png which doesn't get copied.
In one app I had this exact problem which prevented me to submit to the app store, I finally solved it but -believe me or not- I am not able to recreate this condition on another app.
These are the commands I run from my ionic app root:
ionic resources
to generate resources, then:
mkdir -p pgbuild/www;
mkdir -p pgbuild/resources
cp -R ./resources/* ./pgbuild/resources
cp -r ./www/* ./pgbuild/www;
cp config.xml pgbuild/;
cd pgbuild && phonegap remote build ios && cd .. ;
Is phonegap-cli supported for this kind of remote build? Am I missing something?
#suprandr,
I've got online Demo Apps on getting icons and splash screens working. The documentation for iOS is especially convoluted. (Should we blame middle managers for taking old documentation offline?)
The notes on github include: On filesnames and how they are found for iOS
NOTE: I only use PhoneGapBuild. I've created boilerplates to get around this annoyance for remembering what I did the last time. Best of Luck, Jesse.
Here's what I found.
I understand that resources must be inside www, and the path in config.xml is relative to the www folder. That seems to fix the problem, even if you should increase the size of your app bundle this way (it would be better if phonegap could take resources outside of the www folder which is used by the application).
so if I have a
www/resources/ios/icon/something.png
in the config I should use
resources/ios/icon/something.png
Also, the ionic resources command embeds resources into
<platform name="ios">
That doesn't seem to be appreciated by Phonegap Build.

Removed Stylesheet from application but it still appears on Heroku

I remove a stylesheet that contained media queries for specific devices. The changes appear on my local version. When I view it in production on heroku the media queries are still there. I asset removed it from the assets initializer # Rails.application.config.assets.precompile += %w( apps.css ). I ran heroku run assets:clean and restarted the server but it still remains. git status shows that there are not uncommitted changes.
You will have to do a couple of more steps:
$ rake assets:precompile
$ git add .
$ git commit
... deploy to heroku
rake assets:clean just removes the compiled assets locally; without running the precompile step to generate new assets, the assets on heroku does not get refreshed.

Resources