How can I install zipruby under windows [closed] - ruby-on-rails

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've been trying to get zipruby installed on my windoz box, but there has been little joy.
I'm confronted with this message.
Installing zipruby (0.3.6) with native extensions C:/RailsInstaller/Ruby1.9.2/li
b/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_ex
tensions': ERROR: Failed to build gem native extension. (Gem::Installer::Extensi
onBuildError)
I would normally google things, and have in this case, but I see no answer. There seems to be nothing really on the topic of native extensions with respect to ruby. Not at least that I've found, though I'd love to be wrong.
Has anyone installed this gem on a windows box?
If you encountered the issue, how did you get past it/fix it?
Thanks.

<-- I am editing this answer as I work through.. if I eventually crack it, I'll have a log anyone can find... including me -->
Steps I tried that (as yet) didn't work
download zlib-1.2.3-src.exe and run the install.
After the install (where I changed nothing) run the gem install.
w:\ruby> gem install zipruby -- --with-opt-dir="C:\Program Files\GnuWin32\src\zlib\1.2.3\zlib-1.2.3"
The above didn't work, and I seem no closer
Steps that seem to leading somewhere.. But ultimately let me down
Installed two files. http://rubyforge.org/frs/download.php/75848/rubyinstaller-1.9.3-p125.exe and https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe I'm still working my way through the install, but I'll keep this answer fluid.
Where I'm at now.. Just where I started.

There are gem files for Windows available for download from RubyForge, they work with my Ruby 1.9.2 installation on Windows 7
gem install path.to\downloaded.gemfile

Related

ruby on rails - are there any packages or modules that are not written in pure ruby? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am really new to ruby on rails. I heard ruby on rails needs to java virtual machine to be run.
I would like to ask some basic stuff about the ruby on rails.
It seems like ruby on rails can have some native code in the source code.
From what I have researched about ruby on rails, the code is usually runnable on the same platform that the code is written.
So when we need to run the code on different platform, using the Bundler ( rubygems ), it can automatically download the right version of package.
Is this correct??
Also, for the packages, are there any packages or modules that are not written in pure ruby??
I am not sure if there is any. If there is, I think the package manager cannot automatically download the right version and developers need to pull it out and make changes to deploy on the other machines.
I wasn't sure how to look at package dependencies in the package.
Is there a way to find the package dependency??
It is not clear what question you are asking however perhaps I can resolve some of your confusion.
Rails is a framework, distributed as a Ruby gem package which runs as part of a Ruby app on one of several available Ruby interpreters.
Neither Ruby nor Rails depend on the JVM. The JRuby interpreter allows you to run Ruby code within the JVM if you choose to do so.
Many Ruby gems include native extensions which may be platform dependent. Bundler allows you to express platform specific dependencies in cases where you need to use different gems to supply the same interface on different platforms. Take a look at Bundler's platform command as a way to check if your current platform satisfies the requirements of a given gemfile.
For example the sqlite3 gem requires native C extensions which cannot be compiled to run on the JRuby platform. Projects which support JRuby must swap in an alternative like the activerecord-jdbcmysql-adapter gem.

How to run rails bundle install as a cron job in ubuntu 12.04 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have a web application which works on ruby on rails 3.2.x under ubuntu 12.04.
During automation of the setup I run install.sh bash file which has bundle install command as below.
cd /var/www/myapp
bundle install
bundle update
i am automating the setup as to update the latest code from repo. The updated code is available in my repo every 8 hours. Manual setup an setting up test environment is quite tiresome.
Is there anything which I might be missing.

Configuring Ruby On Rails 3 in FreeBsd

Hi am a Ruby on rails developer. I have done a project in ROR and currently its hosted in Ubuntu.Now the requires it to be changed to FreeBSD. As am entirely fresh to FreeBSD i would like to know more about how can configure or install it.
Any Reference Links ?
The simple answer to this question is:
Make sure you have the ports collection installed. See the handbook for details if you don't.
cd /usr/ports/www/rubygem-rails
sudo make install
If you have problems from there, ask specific questions.

Running Phantomjs on Heroku [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Is there a way to run phantomjs, a command-line tool, on Heroku?
check out this buildpack:
https://github.com/stomita/heroku-buildpack-phantomjs
I also am able to run the x86_64 build of PhamtomJS, just stuck in my app's vendor directory:
http://phantomjs.org/download.html
In Version 1.5 we got rid of the Xvfb and Xlib dependencies.
Now this should be pretty simple.
I'd suggest:
checkout the source
build a binary with the given script (check the options to build the version without xvfb)
be happy :)
Ariya, the main author, also did a good job at incorporating Qt in our codebase directly, so we have a tailored, stripped down Qt that does just what PhantomJS needs and no more :)
I'm not familiar with Phantom, but it looks like a binary, in which case there's a Heroku buildpack which might help you out here:
https://github.com/ryandotsmith/null-buildpack

Looking for SVN Best Practices When Building Rails Applications on Ubuntu [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
First a bit of background.
I have been working on the MS platform for my entire development career. Up until 2 weeks ago, I had never booted any other OS than 98/XP/Vista. I started using VSS long long ago, and made the change to SVN about 2 years ago. With SVN I use TortiseSVN and use the standard branch/tag/trunk setup.
My projects are also self contained, meaning I can go to a fresh dev box, pull down a single repository, open VS, press F5 and it will run (most of the time). All dependencies are stored in a lib folder, source code is in a src folder, etc...
In an effort to learn new things, I've decided to build a Ruby on Rails application and have created a Ubuntu based development machine. I have a SVN server up and running and am working with another person on this project. He happens to be using a Mac for his development machine.
And now for the issues.
I seem to be struggling with how to manage the various versions of ruby, rails and all of the plugin's I'm working with. I also seem to be struggling with using SVN on Ubuntu.
So Ubuntu comes with Ruby pre-installed. I want to say it's version 1.8.5. Either way, I had a bunch of gems to install for the plugin I'm using (Community Engine). Being new to *nix, I didn't use sudo when installing them and ran into all sorts of issues. I ended up blowing away Ruby completely and starting fresh. That seemed to work.
The problem is though, that after I commit my code, and the other guy gets latest, he has to go through the whole process of installing gems.
What is the best practice for managing gems and plug-ins in a RoR application? I don't care if a zillion files get added to SVN. Diskspace and network bandwidth are cheap. I just don't know how to do this correctly.
So on to SVN.
I have installed RapidSVN, but very frequently run into issues with folders getting locked. A couple times I realized my mistake, others, I had no clue why. But in both scenarios, i couldn't fix it. I ended up making a backup of my code, pulling down a new working copy, then manually moving over changes and being a bit smarter when committing them to the project.
I actually RTFM a bit last night and found that I'm supposed to create a bookmark for my repos, then do a "checkout working copy" from that bookmark. I'm not sure why, but ok, that's what the manual says...
What are some best practices for using SVN on a RoR project on Ubuntu?
I'm literally looking for a step by step process on this one.
edit
I forgot to mention, I use NetBeans for my IDE, although i have not looked to see what kind of SVN support it has, if any. I looked at RubyMine, and would love to use it, but it appears to be too unstable right now.
For plugins, I'd personally recommend just sticking them in the vendor folder and add them to SVN as if you'd written the code yourself. Piston was also a great solution, but switched away from it when all the common plugins started moving to github (piston has been unreliable since then)
For gems, hopefully you're using rails 2 or higher. You should be listing the gems you require in your config/environment.rb using config.gem. Here's a bunch of information about that feature
What this means is that if you add a new gem, the next time your co-worker updates, his rails app won't boot until he's got the neccessary gems. He can then install them in one step using sudo rake gems:install
You can take this one step further, and put your gems in the vendor directory. This is commonly known as "vendor everything." The easiest way to do this is to list all the gems you use in environment.rb as above, and then run rake gems:unpack. There are 2 problems with this approach however, so I prefer not to use it myself.
If you have 10 apps and they each vendor their gems, you end up keeping 10 copies of common gems in subversion, which makes updating all your sites a whole lot slower.
This may not be an issue for you, or may be worth putting up with, it's just a personal preference.
Some gems (such as mongrel or hpricot) have native extensions written in C. What this means is that when you install them, the .c source code is downloaded, and gcc gets run to compile it specifically for your system.
If you installed a native C extension on ubuntu, then put it in the vendor folder, and later on tried to run that on OS X (or even possibly a different version of ubuntu) it would most likely crash your ruby process and bring your app down.
If all your gems are pure-ruby ones, then this is not a problem, but it's just something to be aware of.
Many people use piston or desert to manage plugins and install gems into Rail local vendor folder (stored under SVN).
http://www.rubyinside.com/advent2006/12-piston.html
http://pivotallabs.com/users/brian/blog/articles/459-build-your-own-rails-plugin-platform-with-desert
I also recommend using geminstaller which will help you both install all the same gems and the same versions of them
http://geminstaller.rubyforge.org/
I use SVN from the command line but if you were more comfortable with TortiseSVN you might want to try IDEs that have SVN nicely integrated like RadRails and NetBeans. The IDEs have very similar graphical SVN managers similar to Tortise, if you want to work on the cmd line just find a simple 10 minute SVN tutorial and you should be good to go.
I have never heard of rapid SVN and the normal SVN tool has always worked just find with me, hardly ever causing the locking folders issue.
Orion mentioned having to rebuild gems that have been vendored when sharing them between different OS's - you can use the gems:build rake task to rebuild them automatically.
First, figure out svn from the command line. The svn-book is on line. It's not too hard to do svn status or svn commit -m "blah". Most problems come if you use OS functions to delete or rename files. Use the svn commands for that.
Next, if rapidsvn is not working out for you, try svn-workbench. Hate to say it, but none of the linux svn GUI tools that I have seen are as good as tortoisesvn.
Plugins and svn are an issue. There is a tool called piston that aims to clear that up, though I don't use it. I check out the plugins into my vendor/plugins directory. If a new version comes out that I really want, I use my trusty update_plugin bash script to update the plugin:
#!/bin/bash
# reinstall the plugin in an svn friendly way
plugin="some_plugin"
plugin_url="http://some_server/some_plugin/trunk"
for f in site1 site2 site3
do
echo $f
cd ~/rails/$f
svn delete vendor/plugins/$plugin
rm -rf vendor/plugins/$plugin
svn -m "remove $plugin" commit
script/plugin install $plugin_url
svn add vendor/plugins/$plugin
svn -m "add $plugin" commit
done

Resources