Grails 2.0 cant do run-app & - grails-2.0

Adding &'s to the line where I execute grails seems to be breaking things on any computer I try (so far ubuntu 11.10 and cent 5.something)
Example
grails run-app #works beautiful
nohup grails run-app #works beautiful
grails run-app & # no working :(
I get results like this:
$ grails run-app &
[3] 16385
$
[3]+ Stopped grails run-app
What am I doing wrong?

Try
( nohup grails run-app --non-interactive 2>&1 > /dev/null & )
Thanks to Leighton S. for this.

Another way to fix execution of grails run-app in the background is to add this option to you user bashrc/profile:
export GRAILS_OPTS="-Djline.terminal=false"

Related

zprofile missing in OS X Big Sur and "read only filesystem" rejects creation of zprofile

Experiencing this issue on a brand new M1 MacBook Air. Attempted to follow this guide to set up nvm and Node. It worked at first but on subsequent sessions I started to get
zsh: command not found: node
zsh: command not found: npm
Et cetera - I realized I am running zsh and for some reason, I do not have a .zprofile, only a .bash_profile. tail ~/.bash_profile looks like this:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
I cannot create a .zprofile file because I get touch: /.zprofile: Read-only file system.
I could try and force it with sudo, but given that I've messed up the rudimentary setup of this system, I am not inclined to further foobar the setup without a little assistance.
Change
touch /.zprofile
To
touch ~/.zprofile
There is a huge difference!

'RM' is not recognized as an internal or external command while using Meteor on Windows

i am currently having problem with 'meteor' and i am currently new to this learning this stuff. So, after installing 'Meteor' i opened command prompt on Windows and typed :
meteor create goodboy
and then,
cd goodboy
But to delete the live and already running example app, i used :
rm goodboy.*
But the command prompt, gave this error :
rm is not recognized as an internal or external command, operable
program or batch file.
Is there anyway i can fix this error, thank you.
Use del on Windows.
Also, this has nothing to do with Meteor. You can also delete a Meteor project by going to the folder and dragging it to the trash.
If you are on windows, git bash may run such commands.
If you are using Mac then we can simply use
rm -f src/*
and For windows we can use command for this is
del -f "src/*"
Hope this works fine for you.
Download and Extract PortableGit.
This has most of commonly used Linux based tools ported to windows.
Add [PortableGit Path]\usr\bin to PATH variable of Windows
You can also use your system's Git installation instead of PortableGit.
This should solve the problem
I'm running Git shell prompt and for some reason it doesn't have it any more. I ended up using Cygin to get it working:
https://www.cygwin.com/
My penny's worth.
You could potentially add rm to powershell. In your (or a) profile.ps1 (or other if your powershell is not core).
rm {
del
}
or as an alias
Set-Alias rm del
or (and this is a tricky one), run WSL, bind the target folder and run via the linux interface.
PS: running the command via the Git Bash (MINGW64) terminal as suggested above, did the trick for me.
I guess you are not using bash terminal. Try this..
1- Go to the folder that you want to remove its contents lets call it my-app folder.
2- Right click in the empty space, then choose get Bash here.
3- Paste the command rm -f A_folder/* (I'm about to remove the content inside A_folder folder which is a sub-folder inside my-app).
4- Hit enter.
That should remove all content from A_folder folder.
Hope that helps.
I guess you are not using the Git Bash terminal but the normal command prompt.
Do try the same on the Git Bash terminal and you would not face this error anymore.
first, install linux clients for windows, I use Ubunto LTS
then install node.js and run your command again.
here, you find good instructions to do it so, as well as how to install cool new Windows Terminal
you should add
"remove-build": "rmdir /s /q build",
"create-build": "mkdir build",
"clean": "npm run remove-build && npm run create-build",
in package.json

/usr/bin/env: ruby_executable_hooks : No such file or directory

I'm trying to deploy to a Raspberry Pi using Capistrano 3.0 / Thin / NGINX I've got it working, but in my restart block I have
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
execute '/etc/init.d/thin restart'
execute 'sudo /etc/init.d/nginx restart'
end
end
end
To which I am greated with
INFO [128fb9a3] Running /etc/init.d/thin restart on raspberrypi.local
DEBUG [128fb9a3] Command: /etc/init.d/thin restart
DEBUG [128fb9a3] /usr/bin/env:
DEBUG [128fb9a3] ruby_executable_hooks
DEBUG [128fb9a3] : No such file or directory
DEBUG [128fb9a3]
I've tried the answer here but with no success.
The commands seem to work fine if I SSH into the PI and run them as root.
I should mention that I pretty much used this tutorial: http://creativepsyco.github.io/blog/2013/04/10/deploying-rails-on-nginx-and-thin/ to get things setup
Totally Hackish Solution
The gem rvm1-capistrano3 didn't end up working for me, so i ended up just hard linking ruby_executable_hooks and ruby like so
$ ln -s `which ruby_executable_hooks` /usr/bin/ruby_executable_hooks
$ ln -s `which ruby` /usr/bin/ruby
WARNING, This assumes that ruby was installed with RVM, you might want to make sure you are not going to overwrite something by doing something like ls -l /usr/bin | grep ruby
ALSO I realize this is totally hackish and probably not the right thing to do on a production server, but it worked for me on my Raspberry-Pi...
Have you tried switching to system ruby?
rvm use system
Then install capistrano there. This would take your rvm issues out of play.
The article you linked refers to the old version of Capistrano.
It looks like you are using rvm (the ruby_executable_hooks seems to be an RVM thing), in which case you'll need one of the Cap 3 compatible RVM adapters, find them at Github named capistrano/rvm (under the Capistrano account) or rvm1-capistrano3, which appears to be maintained by someone aligned with the rvm core team.

Setting Version of iOS simulator from Command line

Context: Running automated scripts using Xcode's UIAutomation with simulators 6.1 and 5.1
Xcode version is 4.6.1
Problem: When running a shell script from the Terminal, UIAutomation ALWAYS opens up 6.1, even though i've set the app path to 5.1.
I've tried building and running on 5.1, also if i run the test from Instruments, I'm able to choose the target for 5.1 and it works fine. The problem is only when i run it from the command line.
I checked the iphonesimulator.plist and the currentSDKRoot points to the 5.1 path, but as soon as the shell script runs, it changes to 6.1. Is there anyway I can force it to use 5.1?
After hours of searching (including the most apt one - Launch a specific Hardware version of iOS simulator using instruments command line utility) , there seems to be no solution to this.
There is a way to set the device using defaults write com.apple.iphonesimulator \ "SimulateDevice" '"iPad"'
I need something like defaults write com.apple.iphonesimulator \ "Version" '"5.1"'
though obviously that doesn't work.
Any pointers will be much appreciated. Thank You!
EDIT: I was hoping this would be resolved with XCode 5, but I still have the same issue and iOS7 simulator ALWAYS opens up! Btw,is there a way to circumvent this issue - I'm sure there are many out there running multiple simulator versions.
This isn't elegant, but it is a work around that we have been able to get to work on our automation setup:
Install Xcode 5 from the App Store
Install Xcode 4.6.3 or from the developer portal's "Old Versions of Xcode page"
Repeat with older versions of Xcode where the max sim version == the one you want to run
Use "sudo xcode-select -switch /path/to/Xcode.app" to pick the version of Xcode
Hope that helps!
I also ran into this issue while running my automation tests on my Jenkins box and I did the following to test my app with ver 6.1 simulator and not 7.0 simulator:
Using Jenkins:
STEP 1 = I create one job that builds my ios app with the 6.1 sdk version.
===========================================
STEP 2 = I create a 2nd job using a bash script that downstreams from the 1st job which does the following:
[Go inside the Xcode app location to get to the iphone simulator sdk directory]
cd '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/'
[Move the 'iPhoneSimulator7.0.sdk' directory to another location (I chose the desktop)]
echo [ENTER ADMIN PASSWORD HERE] | sudo -S mv iPhoneSimulator7.0.sdk/ ${HOME}/Desktop
[Rename the 'iPhoneSimulator6.1.sdk' to 'iPhoneSimulator7.0.sdk']
echo [ENTER ADMIN PASSWORD HERE] | sudo -S mv iPhoneSimulator6.1.sdk/ iPhoneSimulator7.0.sdk/
===========================================
STEP 3 = I create 3rd job that executes my tests. The 3rd job downstreams from my 2nd job.
===========================================
STEP 4 = I create a 4th job that downstreams from the 3rd job. The 4th job uses a bash script which does the following:
[Go inside the Xcode app location to get to the iphone simulator sdk directory]
cd '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/'
[Rename the 'iPhoneSimulator7.0.sdk' back to 'iPhoneSimulator6.1.sdk']
echo [ENTER ADMIN PASSWORD HERE] | sudo -S mv iPhoneSimulator7.0.sdk/ iPhoneSimulator6.1.sdk/
[Go to directory where you moved the 'iPhoneSimulator7.0.sdk' (in my case I moved the 'iPhoneSimulator7.0.sdk' to the desktop)]
cd ${HOME}/Desktop
[Move the 'iPhoneSimulator7.0.sdk' directory back to the Xcode app sdk directory]
echo [ENTER ADMIN PASSWORD HERE] | sudo -S mv iPhoneSimulator7.0.sdk/ '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/'
[I kill any lingering processes related to the automation]
ps ax|grep [b]ash|awk '{print $1}'|xargs kill -9
ps ax|grep [i]nstruments|awk '{print $1}'|xargs kill -9
===========================================
I probably need to make this process more foolproof however I think its better than having multiple instances of xcode on the automation machine.

How to use XULRunner to run SQLite Manager outside of Firefox in Mac OS X Lion?

I have installed XULRunner 11.0 (xr) from here:
Downloads - sqlite-manager - Extension for Firefox and other apps to manage any sqlite database - Google Project Hosting
I have followed the steps listed here:
kiveo - Mac SQLite Manager Standalone App
I have read and tried the suggestions here (though they're for version 6.0):
stackoverflow: How to Install and run a XulRunner Application on Mac OS X?
I am able to get the help listing with this command:
/Library/Frameworks/XUL.framework/xulrunner-bin -h
I am able to run the app from Firefox using this command (after changing the max version in sqlitemanager-xr-0/application.ini to 11.0 from 11.0a1):
/Applications/Firefox.app/Contents/MacOS/firefox --app ~/Downloads/sqlitemanager-xr-0/application.ini
Here are the contents of the application.ini file:
[App]
Name=sqlite-manager
ID=SQLiteManager#mrinalkant.blogspot.com
Version=0.7.7
BuildID=201111132204
Vendor=lazierthanthou
Copyright=Copyright (c) 2008 - 2011 lazierthanthou
[Gecko]
MinVersion=2.0
MaxVersion=11.0
[XRE]
EnableExtensionManager=1
When I run the following command in Terminal, with or without sudo, it just immediately returns to the command prompt. There are no error messages. No application appears under Applications. Nothing seems to happen at all. (And, despite the stackoverflow page above noting that --install-app may not really be supported, it is in the XULRunner help listing - which I guess doesn't necessarily mean it'll work ;)
/Library/Frameworks/XUL.framework/xulrunner-bin --install-app Downloads/sqlitemanager-xr-0/ /Applications
Following a suggestion below, I checked for an exit code. The line above is returning 2.
Help?
Just like you did with Firefox, this command should run your app:
/Library/Frameworks/XUL.framework/xulrunner-bin --app ~/Downloads/sqlitemanager-xr-0/application.ini
Also, the --app switch is optional within XULRunner.
Here's how you can make a self-contained application you can run from the Dock.
Use the xulrunner --install-app command to create the application and then copy all contents of XUL.framework/Versions/Current into the generated application at /Applications/sqlite-manager.app/Contents/MacOS.
You can then create a wrapper script that runs the xulrunner within the generated app with the application.ini file as described here.
For example, put the following into sqlite-manager.app/Contents/MacOS/sqlite-manager and make it executable.
#!/usr/bin/env bash
APP_PATH="/Applications/sqlite-manager.app"
"$APP_PATH/Contents/MacOS/xulrunner" --app "$APP_PATH/Contents/Resources/application.ini"
Now you have to tell OS X to run sqlite-manager instead of xulrunner. You can do that by editing sqlite-manager.app/Contents/info.plist and setting CFBundleExecutable to sqlite-manager like this:
<key>CFBundleExecutable</key>
<string>sqlite-manager</string>
The only limitation of this approach is that it breaks when you move the application or rename it. I'd love suggestions on how to get rid of the absolute path within the sqlite-manager script.
try this:
firefox -chrome chrome://sqlitemanager/content/sqlitemanager.xul
or on OS X
/Applications/Firefox.app/Contents/MacOS/firefox -chrome chrome://sqlitemanager/content/sqlitemanager.xul
(found on http://www.egeek.me/2013/09/07/how-to-run-sqlite-manager-with-a-single-command/)
works fine for me on UBUNTU 12.04 to start sqlite manager without starting firefox first
If the install was successful, I think the app should be available in some usual place for your system (which wasn't mentioned, but I'm guessing OSX :). Have you looked under /Applications?
To see whether the command failed quietly, you could check its return value. Is there a verbose switch?
$ cd narnia
bash: cd: narnia: No such file or directory
$ echo $?
1
$ cd .
$ echo $?
0
$ cd narnia && echo "success"
bash: cd: narnia: No such file or directory
$ cd . && echo "success"
success

Resources