so I'm going through the onemonthrails online classes, however I've run into a problem.
Unlike when using a Mac, It's not possible to create a separate 'tab' to continue working whilst the rails server is running or in general. So I've tried just opening another GitBash window like the tutorial suggests, from the programs/apps menu in Windows 8 (whilst the other one is running) but no luck.
Apologies if this is a dumb questions, but am I missing something obvious?
Once you have a GitBash tile in the taskbar, click it while holding Shift to open additional instances.
You should be able to open another app window. Maybe just make sure you're in desktop mode.
Though. If you're going to work on windows for a while, you better start setting up your environment correctly. Honestly, you don't want to use cmd.exe.
Instead, use Console2 wrapping a Powershell prompt. Console2 will allow you to use tabs like Unix prompts. There's a guide to setting this up correctly here: http://www.hanselman.com/blog/Console2ABetterWindowsCommandPrompt.aspx
Also, as you'll now be using Powershell, customize your prompt! For this, I suggest you install Posh-git.
And! To install all this easily and be a windows awesome user, install Chocolatey and install these programs using it :)
Related
I am learning ztree (Zurich Toolbox for Readymade Economic Experiments) from scratch. Actually, I have no problems with understanding how those experiments are built and moreover, the programming is very basic. Unfortunately I struggle with creating a shortcut to zleaf, which is necessary to test the experiments on my own computer. Has anyone experiences with ztree/zleaf and may help me?
If you are using Windows, you can right click zleaf.exe and create shortcut there, like a regular windows executable. Then you can go to properties of it and add necessary parameters to run zleaf.
Alternatively you can use command line interface to run zleaf.exe with certain parameters, without creating a shortcut.
I started looking into docker lately and I understand a lot of the benefits it offers I think, you can quickly create a docker container and run it on different machines. Building (compiling) is also relatively easy, you can download the maven image for example and just build your code. That works fine. So, building is easy, testing is easy and deploying (and running) in production is easy.
What I don't understand is how docker can make the development phase easier. And what I mean with the development phase is, starting up your IDE, reading code, quickly navigate through your methods definition using the methods the IDE provides, use intelliSense, etc. Then change something, run a unit test, try a different third party library, etc. All things you can do with your IDE. But I don't understand how to do this with a docker image. I've read a few posts about starting the IDE from within your docker container, but that requires setting things up with a windows manager and I am not sure if that's the way to go.
Of course I can set up my laptop in such a way that I can do all of this with my IDE, but that way I bypass all of the benefits docker should offer. I still have to download dependencies, set up environment variables, do a lot of manual settings etc. And not just me, but everyone in the team.
So, not a very concrete question, possibly a duplicate, but I just can't wrap my head around it, how to use an IDE together with docker?
Yeah it's hard. It also depends on what language/framework you're using. But the things you mention are all easy to accomplish. For example we use Ruby a lot and someone in my team uses RubyMine to work with his code. That source code is mapped onto the container so the changes are reflected immediately. If you want to run a test, I'm sure you can override the command your IDE brings by default with something custom like docker run --rm myapp ./run_tests.sh or similar. At least that's what I do with VIM.
Probably the most important missing part when doing dev with Docker is debugging. I think JetBrains is starting to add features to their IDE's but I'm not sure on the status of that.
Also, almost every IDE or good editor has an integrated console. You could maintain a docker exec sessions opened there and run all your app commands, like tests, generators or any other. Even do some basic debugging.
Hope it helps.
I need to create a firefox plugin that allows a user to take screenshots of any part of their desktop and have them uploaded to a server. There seems to be lots of plugins for screen capturing a webpage, but nothing for capturing anything outside of firefox. So after a little research I have not found much information on how this might be possible. I don't want to resort to a using a java applet but I will if that is my only option.
Does anyone have advice on how I might create such a feature?
Thanks
I don't think a Firefox addon is the most appropriate approach here. Maybe split the task into a Firefox addon to offer the "upload to a server" component and a native app to do the desktop screenshot (or just integrate with existing screenshot tools).
If you're worried about complicating the installation process for end users, you could look into bundling the addon component and native app into a single installer (e.g. MSI on Windows, RPM on Linux, etc.). You'll have to come up with different apps for each platform you want to support (and maybe even each version - e.g. Windows XP vs Windows 10).
Whatever you decide, you'll probably need to create a more specific question to get further help here (there's no simple Firefox.Addons.API.TakeScreenShot() answer I'm afraid).
Also make sure you're using the right terminology - a plugin is the deprecated NPAPI approach whereas addons are still supported.
I'm actually working on taking native desktop screenshots just in the last coupel of days. I'm using js-ctypes. My work goal is the same exact thing to, upload to server. If you would like to collaborate I am very open to it! We can chat about it on #jsctypes irc channel :) irc://moznet/jsctypes (Mibbit IRC WebApp) If you don't know js-ctypes thats ok i can handle that while you can handle uploading techniques, and an editor on canvas :) The editor is a huge part of it, you can see my ideas/plans here: https://github.com/Noitidart/NativeShot/wiki/NativeShot
I'm really really interested in a collab on this!
I'm still working on windows right now, the color is messed up: https://github.com/Noitidart/NativeShot/tree/digitanks-method
I was just about to start OSX work following this example here: https://developer.apple.com/library/mac/samplecode/SonOfGrab/Introduction/Intro.html and here: Take ScreenShot without Window
You can install the addon from that branch and click the icon that gets added to the toolbar, it will take a screenshot with 3sec delay and then append it to the body of the selected tab. (Windows only right now)
Doneskis baby check it out: https://addons.mozilla.org/en-US/firefox/addon/nativeshot/
Got some quirks. Released it as v1.0 though. I'm working on Android support, pretty close. I need to flesh out the editor tools. Please let me know if you're willing to collaborate.
I'am using the WAMPServer, and it's located in d:/wamp/. Is there a way to show logging window or console in realtime as I'am crawling on my server web ?
On unix/linux boxes I tend to use the tail command to watch logs as I browse for debugging. Of course, Windows has no equivalent, but there are a few options. The one I settled with was mTAIL. It's a standalone app and not a command line program, but it does exactly what you'd expect:
I was going to suggest using unxtools, a suite of ported GNU tools that can be used on the command line, but it's out of date and trying it on more recent versions of Windows I had problems. You can download them from sourceforge if you want to take a look. Also tail for Windows, is another Windows app that unfortunately doesn't seem to work on later versions, but included here in case it saves anyone the time looking.
Of course, you may find that if you prefer the command line you want to look at getting cygwin installed, which contains a host of commands you could use for the task you have.
My current Rails development environment is Aptana + RadRails plugin on Windows XP and it's a little slow running tests, rake, and generators.
If you've evolved and proven your Windows Ruby on Rails development environment into something you're happy with and is fast, please share the details below.
Many thanks,
Eliot
http://www.akitaonrails.com/2009/1/13/the-best-environment-for-rails-on-windows
try this guide
To add on to Omar: instead of dealing with VMWare, you could install Portable Ubuntu, which runs inside Windows. Though you will get a performance hit from doing so, it will give you a Linux environment to work in and you won't have to worry about installing another operating system.
Although I work primarily with Ubuntu now, I was using a windows machine with Vim on it. Vim has a plugin called rails.vim. It understands the rails structure very well. These the things I found very useful.
Navigation between model, controller, unit test, functional test within 3-4 keystrokes using :RModel, RUnittest, :RFunctionaltest, RController.
Ability to run a unit/functional/integration test right away using :Rake
A quick jump to console using :RConsole
A quick jump to helpers using :RHelper
the goto file 'gf' shortcut now behaves in a predictable manner. It even looks up files inside gems you have installed.
The video on the site hardly does any justice to it. If you are not a vim user, then I would suggest E text editor. It is not free but worth every penny you pay.
I am led to believe that Rails (well, Ruby, really) on Windows is generally slow, compared to *n[iu]x, but since I haven't experienced the latter, I remain blissfully ignorant. In particular, there's a lag while the Rails environment loads that is tedious even on a fairly fast (3GHz Xeon) box.
On top of that, there's the overhead that an IDE brings. Of the more recent, I've tried NetBeans and RubyMine. Both are very capable and a little slow, compared to my normal working environment of command line and test editor, which pretty much suffice 95% of the time: I find I don't need much IDE support when I'm developing test-first. I still find myself mostly using SciTE, largely because of the "Run" command being easily accessible. With a little tweak to the "require test_helper" line in my tests, a single test execution is no more than a F5 away, and the whole suite available from the command line with a quick "rake".
If I need to debug into the framework to clear up (usually) some misunderstanding on my part, then I currently lean towards NetBeans, where the debugger seems a little more intuitive. I suspect RubyMine may have more power, but I haven't found myself needing it yet.
Irrespective of all the above though, the key to performance on Windows is the time to execute `environment.rb' and that's not an easy nut to crack. (Here's hoping I'm totally wrong and I've missed something super-cool, btw.)
I would seriously consider against Rails development inside Windows and my reasoning behind it is because you won't be using a Windows machine in production.
You will most likely be running some sort of Linux machine because Passenger wont work on Windows, mongrel_cluster (last time I checked) also doesn't run on Windows and IIS is a nightmare. Trust me, consistency between development and production is a huge bonus.
If you must run Windows, then I would recommend running Rails inside a Virtual Machine with a Linux distribution of your choice. That way you could use something like e-texteditor (which comes highly recommended as a great alternative to Textmate) and have a Samba share to a git/svn repository on your Virtual Machine.
Check VMWare Server out and install CentOS / Ubuntu. It's free and will give you an insight into development in Linux which is ultimately where you want to be at.
I'd recommend jruby for windows.
Ruby in Steel isn't bad if you want to use Visual Studio.
It's got it's issues, but it's not as "slow" as the eclipse variants I've tried.
RadRails so far has the most complete code completion I've seen, as it knows about your models and such far more than Ruby in Steel. Even if it's slow to load the data for it, at least it's there.
If there are not immutable reasons that you are using Windows XP, you should just switch to Linux. There are none of the weird compatibility issues that arise on Windows. If your application will eventually be deployed to a linux machine, it's easier to develop on. Plus, it would solve your performance issues.
https://help.ubuntu.com/community/RubyOnRails
If there are constrains that make Windows absolutely necessary, please revise and specify.