I am trying to deploy a particular version of a bundle through Apache Felix's obr deploy command.
I want to install version 3.1.10 of File Install, but unfortunately deploy does not understand versions (when using # to specify them):
g! deploy "Apache Felix File Install"#3.1.10
Unknown bundle - Apache Felix File Install#3.1.10
Neither does it work if I try the semicolon:
g! deploy "Apache Felix File Install";3.1.10
Target resource(s):
-------------------
Apache Felix File Install (3.0.2)
Deploying...done.
gogo: CommandNotFoundException: Command not found: 3.1.10
Anybody has any idea what's going on?
P.S.:
BONUS points for anybody installing "File Install 3.0.2", and then placing a jar of "3.1.10" into the load directory (thereby installing another "File Install" bundle) - and then deleting the "3.0.2" version! Sadly this does not work, as "File Install" always suspends itself.
Works for me:
g! list -v file
Apache Felix File Install [org.apache.felix.fileinstall] (3.0.2, 3.0.0, 2.0.8, 2.0.4, 2.0.0, 1.2.0, 1.0.0, 0.9.2, 0.9.0)
g! deploy "Apache Felix File Install"#3.0.0
Target resource(s):
-------------------
Apache Felix File Install (3.0.0)
Optional resource(s):
---------------------
Apache Felix Configuration Admin Service (1.2.4)
Apache Felix Log Service (1.0.0)
Deploying...done.
g!
It looks like you are trying to deploy a version of File Install that isn't in the OBR repo...
Related
I've ran a bundle update in my Jekyll project, which is running 4.2.0 but when I deploy to my server I get:
`materialize': Could not find unicode-display_width-1.8.0 in any of the sources
I ran a gem update on my server which successfully updates a bunch of packages, how can I resolve this error.
I am trying to deploy a webapp in Ruby 3.0.2 and Rails 7.0.1 and I have a problem after deploying it via capistrano in a production server Ubuntu 20.04 with nginx(1.18.0) and passenger(6.0.12).
All the processes work fine but the app can not start in production. I get the passenger error page. Finding in logs I get the next error:
"Error: The application encountered the following error: You have already activated io-wait 0.1.0, but your Gemfile requires io-wait 0.2.1. Since io-wait is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports io-wait as a default gem"
I have tried to remove the gem io-wait but is a default system gem and I cannot remove it, I have upgraded the bundler to the latest (2.3.4) and the error persists. I have added the latest io-wait version (0.2.1) and got the same error.
Any help will be welcome.
I got it to work by adding
gem "io-wait", "0.1.0"
I then also had the problem with "strscan". Had to downgrade to "3.0.0".
I was able to get things going by using the following:
gem "io-wait", "0.2.0"
In my gem file I set the two offending gems to the old versions.
gem "io-wait", "0.1.0"
gem "strscan", "3.0.0"
After that, deploying and booting the app worked fine.
Ruby v3.0.2
Rails 7.0.0
I've followed the "minimal AWS deployment" guide here https://github.com/cloudfoundry/cf-release/tree/master/example_manifests to try CloudFoundry.
I understand that I have to install the bosh_cli_plugin_micro, but when I run this on an AWS Ubuntu 14.04 VM:
gem install bosh_cli_plugin_micro
I get:
ERROR: While executing gem ... (Gem::DependencyError)
Unable to resolve dependencies: blobstore_client requires aws-sdk-resources (= 2.2.0); aws-sdk requires aws-sdk-v1 (= 1.60.2)
Installing the AWS ruby sdk doesn't solve the problem. I suspect it's a problem of the aws sdk being a newer version than the one the micro bosh cli expects. Anyone have any suggestions?
One way to ensure you get a consistent set of gems would be to create a Gemfile like this:
source 'https://rubygems.org'
gem 'bosh_cli'
gem 'bosh_cli_plugin_micro'
and then run the bundle command from the same working directory as where your Gemfile is placed. To make sure you're always using the right version of the CLI and plugin, prepend commands with bundle exec, e.g.
$ bundle exec bosh micro deploy /path/to/stemcell
You may even wish to alias bosh to bundle exec bosh.
I have to create a JRuby jar file for my project. Below I provided details about my directory structure and files.
Top level directory - Project1
Under Project1 – I have bin, lib, src folders
Under Project1/bin – I have wrapper shell script from where I am calling jruby jar.
Under Project1/lib – I have jruby-complete-1.6.7.2.jar and ojdbc6.jar
Under Project1/src – I have lib and tool folders
Under Project1/src/lib – I have main.rb file and utilfolder
Under Project1/src/lib/util - I have 2-ruby scripts which are getting called in main.rb.
Under Project1/src/tool- I have Tool.java from where I call main.rb.
Now I have couple of questions -
Do I need to bundle all the gems which I used in my ruby scripts (for example: colorize, socket, net/ssh, etc)?
How do I create a JRuby jar? I saw the following posts on stackoverflow before posting my question but I got confused and kind of not able to figure out from where to start. Please provide some guidance on this.
Below are the steps which worked for me to bundle all the gems into jruby-complete.jar.
Download the jruby-complete-latest_version.jar from http://jruby.org/download.
Verify which gems are included in the downloaded jar, say java -jar jruby-complete-latest_version.jar -S gem list.
To push the gems into jruby-complete-latest_version.jar you need to check for all the required runtime dependecies for that gem. Example: for net-scp you need to download net-ssh gem before.
Download the gems under the same directory where you have jruby-complete-latest_version.jar by using the following command:
java -jar jruby-complete-latest_version.jar -S gem install -i ./net-ssh net-ssh --no-rdoc --no-ri
java -jar jruby-completelatest_version.jar -S gem install -i ./net-scp net-scp --no-rdoc --no-ri
Now add the gems inside ruby-complete-latest_version.jar by using update file (uf) option for the jar file. Example:
jar uf jruby-complete-latest_version.jar -C net-ssh .
jar uf jruby-complete-latest_version.jar -C net-scp .
Check the gem list for the jar file to make sure all the gems are added successfully
java -jar jruby-complete-latest_version.jar -S gem list
Last check to make sure gems are loading successfully, run require statements on irb.
java -jar jruby-complete-latest_version.jar -S irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'net/scp'
=> true
After I have the jruby-complete_latest_version.jar file under lib I used ANT to build the jar for my project.
Again this solution will work for the smaller projects. For big projects Warbler will the best choice as suggested by #joelparkerhenderson.
I tried to use Warbler to make a war of a redmine installation.
I first installed JRuby (1.7.4), then download all gems with ''jruby -S gem install ...'', ''jruby -S bundle''.
I then installed warbler, and tried with or without specifying jruby-openssl in config.gems
org.jruby.exceptions.RaiseException: (LoadError) load error: openssl -- java.lang.NoClassDefFoundError: Could not initialize class org.jruby.ext.openssl.ASN1
I also tried with JRuby 1.7.3 and JRuby 1.7.1, although the .war file that is generated is almost the same size.
I understand that jruby-openssl is part of jruby now.
How can I make this work?
UPDATE: it works with jruby, without making a war. So, I guess warbler must do the packaging wrong.