Rails 3.1 rake assets:precompile failing - rake

Anyone seen this before? If not, any good tips on debugging rake issues w/ no stack trace would be appreciated!
My site's running fine in dev, since assets are not compiled, but the compilation of my assets is failing, and I'm not getting a useful stacktrace, even w/ the --trace flag
All I'm seeing is:
rake assets:precompile --trace 1 ↵
** Invoke assets:precompile (first_time)
** Execute assets:precompile
rake aborted!
undefined method `gsub' for nil:NilClass
Any suggestions? Thanks
-jeff

Related

Vercel Build Through Github Fails But Works Through Vercel --prod [duplicate]

This question already has answers here:
Cannot find module or type declarations while it works in local build
(3 answers)
Closed 7 months ago.
I have my github repo connected to my vercel build for my next.js project, and it auto builds whenever I push to the repo. However, I get this error whenever the Github-deployment builds:
ModuleNotFoundError: Module not found: Error: Can't resolve '../components_nt/tracking/formContent' in '/vercel/path0/pages'
Build error occurred
Error: > Build failed because of webpack errors
at /vercel/path0/node_modules/next/dist/build/index.js:390:19
at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/telemetry/trace/trace.js:60:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Command "yarn run build" exited with 1
I have tried redeploying, reinstalling my next and node_modules, and clearing the build cache. None of these work for the GitHub way.
However, for some odd reason, if I run vercel --prod then it builds properly and works, but I don't know why. I would appreciate doing the Github way as it is less hassle and more streamlined.
Has anyone else ever experienced this issue? Would really appreciate any help!
Turns out I needed to clear the git cache. Quite a interesting error with a simple fix

Capistrano continues with next tasks after assets:precompile for webpack fails when running locally

After assets: precompile fails when compiling the webpacker pack locally, Capistrano continues with the next steps of the deployment. Resulting in the application being deployed with the Javascript files missing.
Is there something special that has to be done in the locally run tasks so Capistrano exits without running the following tasks? Or is it a problem from webpacker that is not raising an exception?
I'm precompiling the assets locally with this task:
run_locally do
execute "RAILS_ENV=production bundle exec rake 'assets:clean'"
execute "RAILS_ENV=production bundle exec rake 'assets: precompile'"
end

rake: NameError: uninitialized constant Config

I am installing Redmine and I am getting crazy because of a rake problem. In particular, in order to perform a bundle install for the different Ruby's plugins, I have been asked to install xapian-full-alaveteli, v 1.2.9.5.
The problem is that I get the following error:
Building native extensions. This could take a while...
ERROR: Error installing xapian-full-alaveteli:
ERROR: Failed to build gem native extension.
/home/redmine/.rvm/rubies/ruby-2.2.0/bin/ruby -rubygems /home/redmine/.rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0/gems/rake-10.4.2/bin/rake RUBYARCHDIR=/home/redmine/.rvm/gems/ruby-2.2.0/extensions/x86_64-linux/2.2.0/xapian-full-alaveteli-1.2.9.5 RUBYLIBDIR=/home/redmine/.rvm/gems/ruby-2.2.0/extensions/x86_64-linux/2.2.0/xapian-full-alaveteli-1.2.9.5
rake aborted!
NameError: uninitialized constant Config
/home/redmine/.rvm/gems/ruby-2.2.0/gems/xapian-full-alaveteli-1.2.9.5/Rakefile:2:in `<top (required)>'
(See full trace by running task with --trace)
rake failed, exit code 1
Gem files will remain installed in /home/redmine/.rvm/gems/ruby-2.2.0/gems/xapian-full-alaveteli-1.2.9.5 for inspection.
Results logged to /home/redmine/.rvm/gems/ruby-2.2.0/extensions/x86_64-linux/2.2.0/xapian-full-alaveteli-1.2.9.5/gem_make.out
I've tried editing by hand the rakefile and removing the line that causes troubles, but it magically reappears. The documentation about the use of rake/gem is, imho, at least vague, therefore I am totally stuck -- with a server that was supposed to be in production two days ago...
Summary
Obsolete calls to Config can cause the error. Try changing
Config::CONFIG ====> RbConfig::CONFIG
In detail
Running a Gem's rakefile caused the error: uninitialized constant Config.
Googling suggests Config is obsolete and to replace it with RbConfig. RbConfig is in the latest Ruby though the document is blank and I cannot find a Config in Ruby.
Fixes replace Config with RbConfig: gettalong/kramdown and thoughtbot/cocaine. Which also worked in my case.
Conclusion
Replace Config::CONFIG with RbConfig::CONFIG

How to compile CLucene for iOS?

I am trying to compile CLucene for iOS and running into some problems.
Here are the steps I've taken
Modify the CLucene CMakeLists.txt to disable multithreading
Create a "build-ios" directory in the CLucene source directory
Drop the cmake file from this site into the cmake directory http://code.google.com/p/ios-cmake/
run the following command "cmake -DCMAKE_TOOLCHAIN_FILE=./iOS.cmake -GXcode ../"
Here's the output from that command. Can someone help me out with the error?
-- Toolchain using default iOS SDK: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - not found.
-- Could NOT find Boost
Boost not found, using local: /Users/aschuler/Desktop/clucene-core-2.3.3.4/src/ext
CMake Error at /Applications/CMake 2.8-6.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
/Applications/CMake 2.8-6.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
/Applications/CMake 2.8-6.app/Contents/share/cmake-2.8/Modules/FindThreads.cmake:157 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
src/shared/CMakeLists.txt:38 (find_package)
-- Configuring incomplete, errors occurred!
Thanks for your help!
looks like boost is missing. boost is a required library - check the readme
I know its been long. But just try Cmake with Zlib. Because i am in the process of doing the same thing you did, but waiting till i receive the MAc mini. If you have found the solution please do share because it will be helpful for me and many others. Thank you.

Clang Static Analyzer can't start. Why?

Getting this error:
2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler 'com.apple.compilers.llvm.clang.1_0.analyzer'
This happens when I execute this script from within xcode:
#!/bin/bash
result=$( osascript << END
tell application "Xcode"
tell active project document
set projectPath to path as string
end tell
end tell
return projectPath
END
)
cd "$result"
/Developer/clang/scan-build -k -V xcodebuild -configuration Debug -sdk iphonesimulator2.2.1
It worked all fine, but abruptly stopped working after restarting xcode. Clang is still installed and still at that specified path. Any idea what that message means?
If you have SnowLeopard and Xcode 3.2, you can run Clang via the menu command: Build and Analyze.