I have created a plugin with jruby-1.7.9 and added below gems inside my gemspec
spec.add_dependency 'phantomjs'
spec.add_dependency 'capybara'
spec.add_dependency 'poltergeist'
Created JAR for this plugin using Warbler(version:1.4.4).
This JAR consist of below code :
require 'capybara'
module Zerp
class Chatter
def say_hello
Capybara.visit 'http://google.com'
puts "#{Capybara.page.text}"
end
end
end
The JAR is executing successfully while running it inside the plugin.
Now I copied JAR at another location and tried to run it from there. Then I'm getting below error when JAR is executing first line of the code(visit google home page) :
Can't open '/home/ndashore/nikhil/zerp.jar!/gems/poltergeist-1.5.1/lib/capybara/poltergeist/client/compiled/main.js'
Have checked file location, the file exist there and I'm able to open it.
Also have tried to use other Gem (tried with phantomjs). It works properly and do the stuff.
Please help me to use poltergeist as bundled gem.
Related
In short: why index.android.bundle is not uploaded to Sentry server following expo's guide
I made a GitHub issue as I tested this with a clean repository. And there I specified the issue better and with more detail. The main problem could be the script I'm using. I will link the issue here:
https://github.com/expo/sentry-expo/issues/313
Hello.
I'm using the latest sentry-expo which correctly sends errors to sentry server.
I have followed the documentation from https://docs.expo.dev/guides/using-sentry/#uploading-source-maps-for-updates
On new builds index.android.bundle and .map is uploaded to sentry.
But when I make an update running eas update and following the sentry-cli releases... script as documented in expo guide, the android-'hash'.map file is uploaded and index.android.bundle is not.
Therefore dist is different between .js and .map file and Sentry issues don't contain source map information:
Source code was not found (see Troubleshooting for JavaScript)
Url app:///index.android.bundle
But if I change index.android.bundle to index.android.bundle.js in Sentry-cli --rewrite command the bundle is uploaded but issues still show the same information probably due to that android Archive is ~/index.android.bundle.js but the issue is expecting ~/index.android.bundle.
package versions:
"#sentry/react-native": "4.9.0",
"expo": "~47.0.8",
"sentry-expo": "~6.0.0",
I add here that I'm on Windows and couldn't get sentry-cli release to work as it is documented in expo-sentry tutorial. I used this script
cross-env ./node_modules/#sentry/cli/bin/sentry-cli releases --org 'organization name' --project 'project name' files 'release name' upload-sourcemaps --dist 'Android Update ID' --rewrite dist/bundles/index.android.bundle dist/bundles/android-'hash'.map
Thank you for all the help!
Android*.js file simply needed to be changed to index.android.bundle not to index.android.bundle.js. Now source maps are showing correctly.
Expo documentation showed everything correctly but my own understanding added the need of .js in file naming. Bundle file without any extension works correctly
I'm working on an app with Firebase and Facebook SDKs, but I have a problem installing Facebook SDK for some reason. Firebase works just fine and I've followed the official facebook guide for Swift. Here's my Podfile:
platform :ios, '10.0'
target 'MyApp_iOS' do
use_frameworks!
# Pods for MyApp_iOS
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Messaging'
pod 'Firebase/Storage'
pod 'FacebookCore'
pod 'FacebookLogin'
I'm getting the 'no such module "FacebookLogin"' error when I try importing FacebookLogin. I've tried installing FBSDKCoreKit and changing platform 9.0 to 10.0 but I got same result. What am I doing wrong?
Here is what you need to do:
Create a directory for your project
Create a new Xcode project in the directory from step 1
In the directory you created run pod init
This will create a Podfile
In the Podfile add the pods you need
Run pod install this will download the needed pod files and create an .xcworkspace file with a name like MyApp_iOS.xcworkspace.
Close the existing xccodeproj file and open the xcworkspace file
Make all you changes in the xcworkspace file. Now FacebookLogin is available.
Special thanks to Thiago for his help with this issue.
I have a Rails 4.2.4 (Ruby 2.2.2) application and I am serving static assets via Cloudfront.
If Cloudfront is serving something you don't want, there are two possibilities:
Invalidate the content in Cloudfront or
Change the name of the asset served
However, when i change
Rails.application.config.assets.version = '1.0'
to
Rails.application.config.assets.version = '2.0'
(in config/initializers/assets.rb)
and
delete all the assets in public/assets
run "RAILS_ENV=staging bundle exec rake assets:precompile"
the same file names are generated!
The only way i found to invalidate the digested file of application.scss was to add some dummy content in order to provoke a new md5 checksum.
What am i doing wrong?
Shouldn't a new assets.version change the digested file names?
Best Regards and thanx!
As per the comments in the Rails pull request I opened, this is a regression that needs to be fixed: https://github.com/rails/sprockets-rails/issues/240
Update: As sansarp mentions, one of the workarounds listed in that github issue is to use an old version of sprockets:
gem 'sprockets', '< 3.0.0'
Another workaround is to use the asset path as a cache breaker instead:
# config/initializers/assets.rb
Rails.application.config.assets.prefix = "/assets/v1"
Using sprockets of previous version could help you to get file names as expected. gem 'sprockets', '< 3.0.0' https://github.com/rails/sprockets
If you use capistrano for deployment be sure to set assets_prefix in the deploy.rb file.
set :assets_prefix, "assets/v1"
I am trying to upload files to my bluemix app and I am having problems using and understanding the file system. After I have succesfully uploaded files I want to give their path on my configuration files.
Specifically, I want to upload a jar file to the server and later use it as javaagent.
I have tried approaching this isuue from several directions.
I see that I can create a folder in the liberty_buildpack and place the files inside I can later access it on the compilation-release phases from the tmp folder:
/tmp/buildpacks/ibm-websphere-liberty-buildpack/lib/liberty_buildpack/my_folder
Also I can see that in the file system that I see when building and deploying the app I can copy only to the folder located in:
/app
So I copied the JAR file to the app file and set it as a javaagent using 2 method:
Manually set enviorment variable JAVA_OPTS with java agent to point to /app/myjar.jar using cf set-env
Deploy a war file of the app using cf push from wlp server and set the java agent inside the server.xml file and attribute genericJvmArguments
Both of those methods didnt work, and either the deploy phase of the application failed or my features simply didnt work.
So I tried searching the application file system using cf files and came up with the app folder, but strangly it didn't have the same file as the folder I deploy and I couldn't find any connection to the deployed folder ot the build pack.
Can someone explain how this should be done correctly? namely, uploading the file and then how should I point to it from the enviorment variable/server file?
I mean should it be /app/something or maybe other path?
I have also seen the use of relative paths like #droplet.sandbox maybe its the way to address those files? and how should I access those folders from cf files
Thanks.
EDIT:
As I have been instructed in the comments I have added the jar file to the system, the problem is that when I add the javaagent variable to the enviorment variable JAVA_OPTS the deploy stage fails with the timeout error:
payload: {... "reason"=>"CRASHED", "exit_status"=>32, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>
1433864527}
The way I am assigning the javaagent is as follows:
cf set-env myApp JAVA_OPTS "path/agent.jar"
I have tried adding several location:
1. I have found that if I add the jar files to my WebContent folder I can find it in: /app/wlp/usr/servers/defaultServer/apps/myapp.war/resources/
2. I have copied the jar file from the /tmp location in the compilation phase to /home/vcap/app/agent.jar
3. I have located the jar file in /app/.java/jre/lib
none of those 3 paths worked.
I found out that if I give a wrong path the system behaves the same so it may be a path problem.
Any ideas?
Try this:
Put your agent jars in a folder called ".profile.d" inside your WAR package;
cf se your-app JAVA_OPTS -javaagent:/home/vcap/app/.profile.d/your.jar ;
Push the war to Bluemix.
Not sure if this is exactly the right answer, but I am using additional jar files in my Liberty application, so maybe this will help.
I push up a myapp.war file to bluemix. Within the war file, inside the WEB-INF folder, I have a lib folder that contains a number of jar files. The classes in those jar files are then used within the java code of my application.
myapp.war/WEB-INF/lib/myPlugin.jar
You could try doing something like that with the jar file(s) you need, building them into the war file.
Other than that, you could try the section Overlaying the JRE from the bluemix liberty documentation to add jars to the JRE.
As per instructions at Jclouds website, I downloaded the Lein BAT file, and also downloaded Curl to the same folder. I am working on a Windows 8 x64 PC.
Now I created a file named "project.clj" within the folder containing lein and curl.
After that, I ran the following command--
lein deps
However, all this does is create a file within following path (within the folder containing Lein and curl)--
target\scale\dependencies
The file named "dependencies" contains the following text--
([:dependencies [[org.jclouds/jclouds-all "1.5.3"] [org.jclouds.driver/jclouds-sshj "1.5.3"]]])
I am not sure what I am doing wrong here... How do I download all of the jclouds files correctly?
sorry, this was updated with lein 2. jclouds.apache.org doc is now corrected.
After creating project.clj...
Execute lein pom, then mvn dependency:copy-dependencies which will fill target/dependency with all the jclouds jars.