I've cloned this repo:
https://github.com/lvillani/quickstart-jekyll-zurb
I got it working locally no problem.
I added a Procfile with the following:
web: bundle exec jekyll serve -P $PORT
Heroku accepts the bundle no problem.
But the server crashes when trying to load a page.
The first problem I had was that it was trying to render a misformated vendor page.
I fixed that by adding this to _config.yml:
exclude:
- "vendor/bundle/ruby
But now my app.scss file can't #import "foundation/settings";.
Here is the relevant portion of the Heroku logs.
"2014-10-16T19:56:05.366451+00:00 app[web.1]: Generating...
2014-10-16T19:56:05.361060+00:00 app[web.1]: Configuration file: /app/_config.yml
2014-10-16T19:56:06.277480+00:00 app[web.1]: Conversion error: There was an error converting 'asset/app.scss'.
2014-10-16T19:56:06.277526+00:00 app[web.1]: jekyll 2.1.1 | Error: File to import not found or unreadable: foundation/settings.
2014-10-16T19:56:06.277529+00:00 app[web.1]: Load path: /app/_vendor/foundation/scss
Everything works fine locally, so I assume this is a Heroku configuration issue but I don't know enough about Heroku to begin to know where to look.
thanks!
Maybe you forgot to run a make setup.
Note that your jekyll is 2.1.1 and current version is 2.4.
Related
I am facing asset loading issue in Rails 5 application deployed on Heroku.
App Configuration is,
ruby => ‘2.3.1’
rails => '~> 5.0.1'
When image is stored on path,
app/assets/home/image1.jpg
I am accessing it in view as,
= image_tag('/assets/home/image1.jpg’)
which is working properly in Development ENV, but not in Production ENV.
As per Heroku log,
ActionController::RoutingError (No route matches [GET]
"/assets/home/image1.jpg")
If I am moving image directly to
app/assets/image1.jpg
then its working on Production ENV.
Please guide about it.
Thanks
It looks like you assets are not compile on heroku.
Follow below code:
config/environments/production.rb
config.assets.compile = true
then run commands:
RAILS_ENV=production rake assets:precompile
then push all compiled files with menifest file to heroku.
I m trying to use travis CI with nodejs and I m facing a problem like this one.
What I want here, is only to use ftp to upload my file, not to run any command.
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
I dont know what is the problem actually... Here's my travis.yml file :
env:
global:
- "FTP_USER=xxx"
- "FTP_PASSWORD=xxx"
after_success:
"curl --ftp-create-dirs -T uploadfilename -u $FTP_USER:$FTP_PASSWORD ftp://xxxx.fr/www/mochatest"
What am I doing wrong ?
I faced similar scenario when I decided to use Travis-CI with HTML+JS app. I finally ended up deployment from my package.json file via "posttest" section. I wrote some code which uses ftp-deploy npm module to upload the files. Test repository here.
When i enter the command:
jekyll serve ,
i get following notice:
$ jekyll serve
Configuration file: e:/workspace/soohu.github.com/_config.yml
Source: e:/workspace/soohu.github.com
Destination: e:/workspace/soohu.github.com/_site
Generating...
done.
and the jekyll stop, without server running.
I check the file_site and can see the static pages in it, and of course i can't view the site locally.
Does anybody know why?
thanks
I just had the same problem and fixed by just appending --force_polling at the end of jekyll serve, aka jekyll serve --force_polling.
For detail, please refer to this issue 'jekyll serve' generating done without server on.
I'm trying to setup sidekiq with my sinatra application, and I'm having
trouble starting up the sidekiq workers to run in the daemon mode, with a configuration file.
My project has the following structure:
project
- config
-- sidekiq.yml #Sidekiq Config File
- app
-- app.rb #Sinatra Application File
- Rakefile
- Gemfile
- etc.
The ultimate goal is to create some rake tasks to handle all sidekiq tasks.
For now, I'm just trying to the get things to work correctly via the command line, and then I'll get it working via rake.
sidekiq.yml
# Sidekiq Configuration
---
development:
logile: ./log/sidekiq_development.log
verbose: true
pidfile: ./tmp/pids/sidekiq.pid
concurrency: 1
queues:
- [household_import, 7]
When I run this command in the project directory:
bundle exec sidekiq -C './config/sidekiq.yml' -e 'development' -d
I get the following:
You really should set a logfile if you're going to daemonize
/Users/gutter007/git/webapps/project/vendor/bundle/gems/sidekiq-2.16.1/lib/sidekiq/cli.rb:141:in
`daemonize'
/Users/gutter007/git/webapps/project/vendor/bundle/gems/sidekiq-2.16.1/lib/sidekiq/cli.rb:39:in
`parse'
/Users/gutter007/git/webapps/project/vendor/bundle/gems/sidekiq-2.16.1/bin/sidekiq:7:in
`<top (required)>'
/Users/gutter007/git/webapps/project/vendor/bundle/bin/sidekiq:23:in
`load'
/Users/gutter007/git/webapps/project/vendor/bundle/bin/sidekiq:23:in
`<main>'
My confusion is that I have the logfile set in the config file. My assumption is that it's not picking up or reading the cofig file correctly.
I tried tweaking the paths, and using full paths with the config file, but it did not seem to change anything the error message. I've also tweaked the config file itself, assuming the format might be off, but no dice.
Does anyone see what I'm doing wrong here?
Please let me know if you need any more information.
thanks.
I dug into the sidekiq code, and debugged my config file issues.
There were two issues:
I spelled logfile incorrectly ... doh!
You need to setup each row
with a colon(:) to symbolize the value. It pulls the yaml file into
a hash, and without the symbol it won't recognize the key
So
development:
logfile: ./log/sidekiq_development.log
won't work, but
development:
:logfile: ./log/sidekiq_development.log
#notice the ':' infront of the logfile
does!
Here is my updated working logfile.
# Sidekiq Configuration
---
development:
:logfile: ./log/sidekiq_development.log
:verbose: true
:pidfile: ./log/tmp/pids/sidekiq.pid
:concurrency: 1
:queues:
- [household_import, 7]
Following command helped me,
sidekiq -d -q carrierwave -l sidekiq.log
you can omit "-q carrierwave" part, if yuo're not using 'carrierwave'
Folks,
I'm attempting to deploy a rails webapp on Heroku using Stripe. This might be a precompiling asset problem. I checked the heroku error logs and there is an actionview template error "undefined method stripe"
Everything works fine on my local machine, it's just something going wrong when pushing to heroku.
2013-02-11T00:22:53+00:00 app[web.1]: ActionView::Template::Error (undefined method `stripe' for #<Rails::Application::Configuration:0x00000003397440>):
2013-02-11T00:22:53+00:00 app[web.1]: 7:
2013-02-11T00:22:53+00:00 app[web.1]: 6: </article>
2013-02-11T00:22:53+00:00 app[web.1]: 9: data-key="<%= Rails.configuration.stripe[:publishable_key] %>"
2013-02-11T00:22:53+00:00 app[web.1]: 8: <script src="https://checkout.stripe.com/v2/checkout.js" class="stripe-button"
2013-02-11T00:22:53+00:00 app[web.1]: 10: data-description="You'll get your information in 2 days!"
Hope someone has some insight in to this issue. I tried just downloading the full stripe.js file and putting it in my assets folder, but that didn't seem to help.
This doesn't appear to be related to asset compilation or stripe.js. This is the line that is failing in your view:
data-key="<%= Rails.configuration.stripe[:publishable_key] %>"
Heroku runs your app with your production environment settings. Is it possible you only have Rails.configuration.stripe set in development.rb, or somewhere similar?
I had the same issue, but it was because when I first started testing Stripe on development I had the actual keys in my stripe.rb file, so I added it to my .gitignore to keep from versioning those keys. When updated my code to run in production, I used ENV vars instead but forgot to remove the that stripe.rb from the .gitignore. Double check to make sure you reconfigure your variables, stop ignore the file, and you should be set.