I have developed a tool with ruby on rails, and I want to install my tool on a client in-house intranet. I can deliver an application which protects my Javascript code and sources, but is there a way to protect/encrypt the ruby on rails code? Compile it maybe?
Related
I have a 3.2.8 Rails application which has been deployed into production and is running just fine. While preparing to code an enhancement I pulled fresh code from the SVN and started up a development version of the application and found the stylesheets were non functional and the Devise logout did not work in DEVELOPMENT.
All other aspects of the application work exactly as they should.
I've been reading many stack over flow Q & A and cannot figure this out.
Then I realized the default version of Ruby did not match the version for the application.
The application was built with ruby 1.9.3 p286 and my machine boots up in Ruby 2.1.0
solution:
stop the server
rvm use ruby-1.9.3-p286
bundle install
rails server
= good to go.
Can anyone tell me how to install rails in windows7 with ruby 1.8.7.
I recommend installing a ruby version manager such as pik to manage installing a sandboxed 1.8.7 - in particular, look at the readme on the github page for using a msi installer package to install ruby from scratch. A ruby version manager is incredibly handy to have, as it lets you flip back and forth between different rubies, with different installed gems, and, if this is important to you, can install various rubies without requiring admin privileges (to run the installer package for pik may require admin privileges).
From this point, use the standard Ruby tools like gem to install Rails. I recommend installing bundler with gem install bundler, then using bundler to handle the rest of your gem needs, as is detailed in the bundler link and especially here. Bundler is great because it manages your configuration precisely based on a file in the directory; this means multiple projects can have multiple versions of different libraries installed, but Bundler makes sure that the configuration is consitent for each project. You can even move your project (including your bundler Gemfile) to a different computer and run bundle install and it will ensure your other computer is using the exact same versions of the same gems for running your software - great for deployment.
I'm going to develop an application on Ruby on Rails which has many library classes. But I have no such idea. Is it possible or not in Rails? If possible, how can I develop my own library class in rails application? Please suggest me.
since i do not understand your question very well, i can only guess what you mean.
there are several ways of abstracting logic in ruby and ruby on rails.
the most general approach is creating ruby gems. this is a package of ruby code that can be used in every ruby project. it's possible to hook into rails through gems via railties.
there are two things that are specific to rails. the first one are plugins, that work very similar to gems and are considered a legacy way of providing functionality, but there are still some plugins around, especially for rails apps prior version 3.
the other thing is engines. these are micro-applications that can be mounted into any rails app. they are self-contained and can provide a lot of functionality based on their namespaced routes.
since rails is based on rack, it's also possible to hook any rack-conform ruby application into the rails router. through this approach it's possible to connect rails apps with ie. sinatra applications.
I've been reading a lot of info on Require.js. AMD seems very interesting and I got it to work in a standalone backbone.js app. However, Sprocket in Rails seems to conflict with it. Do you recommend projects to go with standard Rails asset pipeline without Require.js?
I saw this article but it's for Rails 3.1, so not sure if it's still applicable: Using RequireJS with a Rails 3.1 app
Also, Underscore no longer seems to be supporting AMD. I don't want to use yet another package to work with Backbone.
I did this awhile ago I used the "use" requireJS plugin to load incompatible libs like underscore.js
https://github.com/tbranyen/use.js
and I think I only included require.js into the sprockets assets, and used it like in any other application.
How to cucumber testing create in rails application which running on webrick server?
Cucumber is pretty easy to work with. I would highly suggest that you watch these 2 railscasts:
http://railscasts.com/episodes/155-beginning-with-cucumber
http://railscasts.com/episodes/159-more-on-cucumber
If you already know a bit about regular expressions as well, cucumber will be a breeze to work with.