This document provides a tutorial for distributing Rails applications by packaging them into standalone executables. It outlines the necessary ingredients like Ruby, Rails, SQLite. It then describes the steps to setup the environment, create a SQLite database, develop the Rails app, create a Ruby archive (RBA) of the application using Tar2RubyScript, and finally generate a standalone executable using RubyScript2Exe. Some adjustments are needed to the code to properly handle database file paths when running as an RBA versus a normal Rails application. Following these steps allows one to distribute a complete Rails application in a single executable without any other dependencies.
The document provides instructions on setting up a sample Spring web application using Struts, Spring, and Hibernate. It covers downloading necessary components, creating the project structure and Ant build file, writing a unit test for the persistence layer, configuring Hibernate and Spring, and creating the initial model class and mapping file. The goal is to lay the groundwork for a basic CRUD application to manage user data across the three tiers.
An introduction to the Docker concept. Experiences with ASP.NET Core and Docker, How Docker can help produce modular deployments for ASP.NET web applications. Presented at Vermont Code Camp #8, UVM, Burlington VT, September 17, 2016
The servlet lifecycle consists of four main steps:
1) Loading and instantiation where the servlet class is loaded and an instance is created.
2) Initialization where the init() method is called to perform initialization.
3) Request handling where the service() method handles client requests.
4) End of service where the destroy() method is called before the servlet is removed from service to clean up resources.
The main lifecycle methods are init(), service(), and destroy(). The init() method performs initialization, service() handles requests, and destroy() performs cleanup before removal.
ave time learning on your own. Start Building with React, MongoDB, Express, & Node. The MERN Stack.
Learning a new JavaScript framework is difficult. You can spend weeks learning new concepts. If an online example doesn’t work, you may spend countless hours Googling, searching Stack Overflow and blogs for the solution.
Take the fast track and learn from an experienced Senior Software Engineer and professional instructor!
About this CourseÂ
This highly interactive course features a large amount of student labs and hands-on coding. You will be taught how to assemble the complete stack required to build a modern web app using React.js, MongoDB (a NoSQL database) and Express (a framework for web application servers). This course will also cover many other tools that go into building a complete web application: React Router, React-Bootstrap, Redux, Babel, and Webpack.Â
What You Will Learn
• How to use modern JavaScript features
• Webpack
• Node & Express
• Reading and writing data to a MongoDB database
• Babel
• React
• State Management with Redux
• Mongoose
• And More!
This document provides an overview of servlets and related Java web application concepts. It discusses the servlet lifecycle, how servlets handle HTTP requests and responses, and how they fit into the Java EE context. It also covers servlet containers, the model-view-controller pattern, using servlet contexts and configurations, session management, filters, and multithreading issues.
Developing SOAP Web Services using Java
Developing Web Services Using Apache Axis
Installing Axis for Web Services
Running Axis without Tomcat/Servlet Engine
Axis infrastructure and components
Axis Web services programming Model
The document discusses servlets in the Java EE platform. Servlets are Java classes that handle requests and produce responses, like HTTP requests and responses. Other technologies in the presentation tier include JavaServer Pages (JSP) and the JSP Standard Tag Library (JSTL). Servlets extend the HttpServlet class and override methods like doGet() and doPost() to generate dynamic content in response to requests. The servlet lifecycle and how requests are processed is also described.
The document provides instructions on setting up a sample Spring web application using Struts, Spring, and Hibernate. It covers downloading necessary components, creating the project structure and Ant build file, writing a unit test for the persistence layer, configuring Hibernate and Spring, and creating the initial model class and mapping file. The goal is to lay the groundwork for a basic CRUD application to manage user data across the three tiers.
An introduction to the Docker concept. Experiences with ASP.NET Core and Docker, How Docker can help produce modular deployments for ASP.NET web applications. Presented at Vermont Code Camp #8, UVM, Burlington VT, September 17, 2016
The servlet lifecycle consists of four main steps:
1) Loading and instantiation where the servlet class is loaded and an instance is created.
2) Initialization where the init() method is called to perform initialization.
3) Request handling where the service() method handles client requests.
4) End of service where the destroy() method is called before the servlet is removed from service to clean up resources.
The main lifecycle methods are init(), service(), and destroy(). The init() method performs initialization, service() handles requests, and destroy() performs cleanup before removal.
ave time learning on your own. Start Building with React, MongoDB, Express, & Node. The MERN Stack.
Learning a new JavaScript framework is difficult. You can spend weeks learning new concepts. If an online example doesn’t work, you may spend countless hours Googling, searching Stack Overflow and blogs for the solution.
Take the fast track and learn from an experienced Senior Software Engineer and professional instructor!
About this CourseÂ
This highly interactive course features a large amount of student labs and hands-on coding. You will be taught how to assemble the complete stack required to build a modern web app using React.js, MongoDB (a NoSQL database) and Express (a framework for web application servers). This course will also cover many other tools that go into building a complete web application: React Router, React-Bootstrap, Redux, Babel, and Webpack.Â
What You Will Learn
• How to use modern JavaScript features
• Webpack
• Node & Express
• Reading and writing data to a MongoDB database
• Babel
• React
• State Management with Redux
• Mongoose
• And More!
This document provides an overview of servlets and related Java web application concepts. It discusses the servlet lifecycle, how servlets handle HTTP requests and responses, and how they fit into the Java EE context. It also covers servlet containers, the model-view-controller pattern, using servlet contexts and configurations, session management, filters, and multithreading issues.
Developing SOAP Web Services using Java
Developing Web Services Using Apache Axis
Installing Axis for Web Services
Running Axis without Tomcat/Servlet Engine
Axis infrastructure and components
Axis Web services programming Model
The document discusses servlets in the Java EE platform. Servlets are Java classes that handle requests and produce responses, like HTTP requests and responses. Other technologies in the presentation tier include JavaServer Pages (JSP) and the JSP Standard Tag Library (JSTL). Servlets extend the HttpServlet class and override methods like doGet() and doPost() to generate dynamic content in response to requests. The servlet lifecycle and how requests are processed is also described.
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Yevgeniy Brikman
Â
This is a talk about managing your software and infrastructure-as-code that walks through a real-world example of deploying microservices on AWS using Docker, Terraform, and ECS.
The document discusses the Guardian's transition from using relational databases to NoSQL databases like MongoDB. It describes the early, mid, and modern periods of the Guardian's technology stack, moving from bespoke systems to vendor CMS platforms to monolithic Java applications. Problems with scaling and complexity motivated experimenting with partial NoSQL solutions and APIs. MongoDB was ultimately chosen as it allows flexible schemas, complex queries, and easy scaling similar to relational databases but with simpler implementation. The first project to use MongoDB is replacing the user identity system stored in Oracle.
The document introduces the Play Framework version 2.1 and highlights its key features. It demonstrates building a sample application in Scala using Play's reactive, non-blocking architecture. Key features discussed include Play's built-in support for Scala, reactive programming, JSON APIs, routing, templates, and testing.
Welcome to presentation on Spring boot which is really great and relatively a new project from Spring.io. Its aim is to simplify creating new spring framework based projects and unify their configurations by applying some conventions. This convention over configuration is already successfully applied in so called modern web based frameworks like Grails, Django, Play framework, Rails etc.
This document provides an overview of servers, servlets, and related technologies. It defines that a server is a computer that responds to requests from clients, with typical requests including serving web pages and files. It introduces Apache as a popular web server, and notes that Tomcat is the servlet container that handles servlet requests for Apache. Finally, it defines that a servlet is a Java class that extends HttpServlet and overrides methods like doGet and doPost to respond to HTTP requests from clients.
The document provides an introduction to Typesafe Activator and the Play Framework. It discusses how Activator is a tool that helps developers get started with the Typesafe Reactive Platform and Play applications. It also covers some core features of Play like routing, templates, assets, data access with Slick and JSON, and concurrency with Futures, Actors, and WebSockets.
This document provides an overview of servlets and JSPs. It discusses how servlets were developed to address disadvantages of CGI programs. Servlets run within a web container and have a lifecycle of init(), service(), and destroy() methods. The document also covers implementing a simple servlet, using HttpServletRequest and HttpServletResponse objects, and configuring servlets in web.xml. It describes how JSPs work by being converted to servlets and discusses JSP directives, actions, and scripting elements.
The Docker Toolbox installs several components to allow users to run Docker on their Mac systems without running a Linux VM directly. It includes the Docker client, Docker Machine, Docker Compose, Docker Kitematic, and Oracle VirtualBox. Docker Machine is used to create and connect to a lightweight Linux VM hosted by VirtualBox where the Docker daemon runs. This allows users to work with Docker images and containers without having to manage a separate Linux environment.
Puppet is a configuration automation platform that simplifies system administration tasks. It uses a client/server model where agent nodes pull configuration profiles from the Puppet master. Modules on the master describe the desired system configuration. Puppet translates modules into code and configures agent servers as needed. Puppet can manage infrastructure across multiple servers.
Introducing Chef | An IT automation for speed and awesomenessRamit Surana
Â
Chef turns infrastructure into code. With Chef, you can automate how you build, deploy, and manage your infrastructure.
It is a powerful automation platform that transforms complex infrastructure into code, bringing your servers and services to life.
Gianluca Arbezzano Wordpress: gestione delle installazioni e scalabilità con ...Codemotion
Â
Gianluca Arbezzano discusses using Docker and related technologies to scale WordPress deployments. Docker provides isolation and security while allowing workloads to scale horizontally across multiple servers. Elastic Container Service on AWS further simplifies management by allowing containers to be orchestrated across a cluster of EC2 instances and auto-scaled based on demand. HAProxy can also help load balance traffic between containers for high availability.
Rails security best practices involve defending at multiple layers including the network, operating system, web server, web application, and database. The document outlines numerous vulnerabilities at the web application layer such as information leaks, session hijacking, SQL injection, mass assignment, unscoped finds, cross-site scripting (XSS), cross-site request forgery (CSRF), and denial-of-service attacks. It provides recommendations to address each vulnerability through secure coding practices and configuration in Rails.
ASP.NET MVC 4 Request Pipeline InternalsLukasz Lysik
Â
This is a presentation about ASP.NET MVC 4 request pipeline, presented on Study Group meeting. It mainly contains analysis of MVC framework's source code.
Akka is using the Actors together with STM to create a unified runtime and programming model for scaling both UP (multi-core) and OUT (grid/cloud). Akka provides location transparency by abstracting away both these tangents of scalability by turning them into an ops task. This gives the Akka runtime freedom to do adaptive automatic load-balancing, cluster rebalancing, replication & partitioning
Servlets are Java programs that extend the functionality of web servers. They allow dynamic content and processing on the server-side. Servlets are efficient, robust, portable, and persistent. The lifecycle of a servlet involves initialization via init(), processing requests via service(), and destruction via destroy(). Servlets can be deployed on Java web servers or J2EE application servers using deployment tools.
This document discusses servlets, servlet configuration, servlet context, session tracking techniques, and servlet filters in Java web applications. It explains that servletconfig is used to configure individual servlets while servletcontext is used for global application configuration. Session tracking can be done via cookies, hidden form fields, URL rewriting, or HTTP session. Filters provide preprocessing and postprocessing of requests and have initialization, processing, and destruction lifecycle methods.
Managing big test environment and running tests with Jenkins, Jenkins Job bui...Timofey Turenko
Â
A short presentation about our experience of using Jenkins and Jenkins Job Builder with Vagrant as a backend tool to manage complex environment (tens of virtual machines for every test run) for database proxy server testing.
Play Framework is a Java web framework that aims to improve development efficiency over traditional Java web frameworks. It allows for automatic compilation and deployment, integrates with databases using JPA, and supports features like REST, templates, and asynchronous programming. The documentation provides an example of generating a new Play application, connecting it to a database, writing tests, and creating models, views and controllers to build out the application.
Web application development using Play Framework (with Java)Saeed Zarinfam
Â
This document provides an overview of the Play Framework for web application development using Java. It discusses the history and architecture of Play, how to set up a Play project, the MVC structure, routing, controllers, views, sessions, assets, hot code reloading, databases, testing, deployment, and scaling. Play uses Netty as its web server, is stateless, supports hot code reloading, and allows building asynchronous and reactive applications. It also has integrations for Akka, WebSockets, caching, internationalization, and more.
This document provides a tutorial for using Ruby with the Enlightenment Foundation Libraries (EFL) for building graphical user interfaces. It begins with an introduction to EFL and why the author chose it. The tutorial then covers first steps like installing Ruby-EFL and writing a basic "Hello World" program. It demonstrates how to create rectangles, handle events like resizing and mouse clicks, and improve the Evas drawing class to simplify rectangle creation. The goal is to help readers understand and start developing with the Ruby-EFL bindings.
JRuby in Action provides an overview of JRuby and Ruby on Rails. JRuby allows developers to run Ruby code on the Java Virtual Machine, providing access to Java libraries and improved performance over CRuby. Ruby on Rails is a full-stack web framework that follows conventions over configurations and the Don't Repeat Yourself principle. The presentation demonstrates building a simple blog application in Ruby on Rails and deploying Rails applications to Java application servers using JRuby.
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Yevgeniy Brikman
Â
This is a talk about managing your software and infrastructure-as-code that walks through a real-world example of deploying microservices on AWS using Docker, Terraform, and ECS.
The document discusses the Guardian's transition from using relational databases to NoSQL databases like MongoDB. It describes the early, mid, and modern periods of the Guardian's technology stack, moving from bespoke systems to vendor CMS platforms to monolithic Java applications. Problems with scaling and complexity motivated experimenting with partial NoSQL solutions and APIs. MongoDB was ultimately chosen as it allows flexible schemas, complex queries, and easy scaling similar to relational databases but with simpler implementation. The first project to use MongoDB is replacing the user identity system stored in Oracle.
The document introduces the Play Framework version 2.1 and highlights its key features. It demonstrates building a sample application in Scala using Play's reactive, non-blocking architecture. Key features discussed include Play's built-in support for Scala, reactive programming, JSON APIs, routing, templates, and testing.
Welcome to presentation on Spring boot which is really great and relatively a new project from Spring.io. Its aim is to simplify creating new spring framework based projects and unify their configurations by applying some conventions. This convention over configuration is already successfully applied in so called modern web based frameworks like Grails, Django, Play framework, Rails etc.
This document provides an overview of servers, servlets, and related technologies. It defines that a server is a computer that responds to requests from clients, with typical requests including serving web pages and files. It introduces Apache as a popular web server, and notes that Tomcat is the servlet container that handles servlet requests for Apache. Finally, it defines that a servlet is a Java class that extends HttpServlet and overrides methods like doGet and doPost to respond to HTTP requests from clients.
The document provides an introduction to Typesafe Activator and the Play Framework. It discusses how Activator is a tool that helps developers get started with the Typesafe Reactive Platform and Play applications. It also covers some core features of Play like routing, templates, assets, data access with Slick and JSON, and concurrency with Futures, Actors, and WebSockets.
This document provides an overview of servlets and JSPs. It discusses how servlets were developed to address disadvantages of CGI programs. Servlets run within a web container and have a lifecycle of init(), service(), and destroy() methods. The document also covers implementing a simple servlet, using HttpServletRequest and HttpServletResponse objects, and configuring servlets in web.xml. It describes how JSPs work by being converted to servlets and discusses JSP directives, actions, and scripting elements.
The Docker Toolbox installs several components to allow users to run Docker on their Mac systems without running a Linux VM directly. It includes the Docker client, Docker Machine, Docker Compose, Docker Kitematic, and Oracle VirtualBox. Docker Machine is used to create and connect to a lightweight Linux VM hosted by VirtualBox where the Docker daemon runs. This allows users to work with Docker images and containers without having to manage a separate Linux environment.
Puppet is a configuration automation platform that simplifies system administration tasks. It uses a client/server model where agent nodes pull configuration profiles from the Puppet master. Modules on the master describe the desired system configuration. Puppet translates modules into code and configures agent servers as needed. Puppet can manage infrastructure across multiple servers.
Introducing Chef | An IT automation for speed and awesomenessRamit Surana
Â
Chef turns infrastructure into code. With Chef, you can automate how you build, deploy, and manage your infrastructure.
It is a powerful automation platform that transforms complex infrastructure into code, bringing your servers and services to life.
Gianluca Arbezzano Wordpress: gestione delle installazioni e scalabilità con ...Codemotion
Â
Gianluca Arbezzano discusses using Docker and related technologies to scale WordPress deployments. Docker provides isolation and security while allowing workloads to scale horizontally across multiple servers. Elastic Container Service on AWS further simplifies management by allowing containers to be orchestrated across a cluster of EC2 instances and auto-scaled based on demand. HAProxy can also help load balance traffic between containers for high availability.
Rails security best practices involve defending at multiple layers including the network, operating system, web server, web application, and database. The document outlines numerous vulnerabilities at the web application layer such as information leaks, session hijacking, SQL injection, mass assignment, unscoped finds, cross-site scripting (XSS), cross-site request forgery (CSRF), and denial-of-service attacks. It provides recommendations to address each vulnerability through secure coding practices and configuration in Rails.
ASP.NET MVC 4 Request Pipeline InternalsLukasz Lysik
Â
This is a presentation about ASP.NET MVC 4 request pipeline, presented on Study Group meeting. It mainly contains analysis of MVC framework's source code.
Akka is using the Actors together with STM to create a unified runtime and programming model for scaling both UP (multi-core) and OUT (grid/cloud). Akka provides location transparency by abstracting away both these tangents of scalability by turning them into an ops task. This gives the Akka runtime freedom to do adaptive automatic load-balancing, cluster rebalancing, replication & partitioning
Servlets are Java programs that extend the functionality of web servers. They allow dynamic content and processing on the server-side. Servlets are efficient, robust, portable, and persistent. The lifecycle of a servlet involves initialization via init(), processing requests via service(), and destruction via destroy(). Servlets can be deployed on Java web servers or J2EE application servers using deployment tools.
This document discusses servlets, servlet configuration, servlet context, session tracking techniques, and servlet filters in Java web applications. It explains that servletconfig is used to configure individual servlets while servletcontext is used for global application configuration. Session tracking can be done via cookies, hidden form fields, URL rewriting, or HTTP session. Filters provide preprocessing and postprocessing of requests and have initialization, processing, and destruction lifecycle methods.
Managing big test environment and running tests with Jenkins, Jenkins Job bui...Timofey Turenko
Â
A short presentation about our experience of using Jenkins and Jenkins Job Builder with Vagrant as a backend tool to manage complex environment (tens of virtual machines for every test run) for database proxy server testing.
Play Framework is a Java web framework that aims to improve development efficiency over traditional Java web frameworks. It allows for automatic compilation and deployment, integrates with databases using JPA, and supports features like REST, templates, and asynchronous programming. The documentation provides an example of generating a new Play application, connecting it to a database, writing tests, and creating models, views and controllers to build out the application.
Web application development using Play Framework (with Java)Saeed Zarinfam
Â
This document provides an overview of the Play Framework for web application development using Java. It discusses the history and architecture of Play, how to set up a Play project, the MVC structure, routing, controllers, views, sessions, assets, hot code reloading, databases, testing, deployment, and scaling. Play uses Netty as its web server, is stateless, supports hot code reloading, and allows building asynchronous and reactive applications. It also has integrations for Akka, WebSockets, caching, internationalization, and more.
This document provides a tutorial for using Ruby with the Enlightenment Foundation Libraries (EFL) for building graphical user interfaces. It begins with an introduction to EFL and why the author chose it. The tutorial then covers first steps like installing Ruby-EFL and writing a basic "Hello World" program. It demonstrates how to create rectangles, handle events like resizing and mouse clicks, and improve the Evas drawing class to simplify rectangle creation. The goal is to help readers understand and start developing with the Ruby-EFL bindings.
JRuby in Action provides an overview of JRuby and Ruby on Rails. JRuby allows developers to run Ruby code on the Java Virtual Machine, providing access to Java libraries and improved performance over CRuby. Ruby on Rails is a full-stack web framework that follows conventions over configurations and the Don't Repeat Yourself principle. The presentation demonstrates building a simple blog application in Ruby on Rails and deploying Rails applications to Java application servers using JRuby.
This document provides instructions for labs 5 and 6 of the IELM 511 course, which teach how to create and populate a database using phpMyAdmin. The labs will have students create tables in a MySQL database called "bank" using phpMyAdmin's GUI and SQL commands, and populate the tables with data. Basic PHP scripts are also demonstrated to connect to and interact with the MySQL database.
This document provides a tutorial for setting up a many-to-many relationship in Rails. It describes creating Expense and Tag models with a join table, generating scaffolds, and customizing views and controllers to display tags as checkboxes for selection when creating or editing an expense. The controller is updated to handle the tag selections by finding Tag objects by ID and associating them with the expense on create/update.
This document describes how to access a MySQL database from Ruby by using a SOA gateway to create web services from the MySQL tables. It involves installing Ruby and MySQL, populating the MySQL database with sample data, creating a ODBC connection, using the SOA gateway to generate WSDLs and web services from the MySQL tables, and writing a Ruby script to call the web services and retrieve data from the MySQL database via SOAP.
This document provides instructions for several labs on testing a timeclock application using Ruby. It discusses exploring the timeclock interface by making mistakes, testing command results using an assert_equal function, using the Test::Unit framework for testing, working with arrays and hashes, and testing the timeclock application's web services interface.
This document provides instructions for installing Ruby on Rails on Ubuntu Linux. It discusses downloading and installing Ruby, the RubyGems package manager, Rails and other dependencies like MySQL. It also gives an overview of Ruby and Rails, highlighting features like object orientation, automatic memory management and the MVC framework. Example Ruby code is shown demonstrating language features. Links to resources for learning Rails are provided at the end.
The document discusses setting up a Ruby on Rails web application. It explains how to install Ruby and Rails, configure the database, and generate models. The Rails directory structure is described, including the app, config, and db folders. Finally, it shows how to start the web server and create a basic Rails application.
This document provides a fast-paced introduction to Ruby, Rails, and additional technologies. It begins with an overview of Ruby basics, syntax, and uses beyond scripts. It then covers Rails fundamentals including MVC architecture, scaffolding, models, views, controllers, and routes. Additional topics discussed include gems, Git, and deploying to Heroku. The document concludes by outlining a sample project to build a marketplace for buying and selling robot spare parts.
The document discusses software as a service (SAAS) and why the company Viridian chose to use the Ruby on Rails web application framework. It notes that Rails allows for lower entry costs than other options due to reduced server maintenance needs and flexibility. It also summarizes some key advantages of Rails like its convention over configuration approach and support for modern technologies. The document provides resources for learning Rails including dev environments, tutorials, and open source projects to review.
Building Application with Ruby On Rails FrameworkEdureka!
Â
Ruby on Rails training certifies you with in demand Web Application Technologies to help you grab the top paying IT job title with Web Application skills and expertise in Full Stack. Rails is written in Ruby, which is a language explicitly designed with the goal of increasing programmer happiness. This unbiased and universal view makes Ruby on Rails unique in today's Job market as a leader in the Web Application platform.
This document provides an overview of Ruby on Rails, including what it is, how to install it, how to create a sample Rails application, and recommended resources for learning more. Ruby on Rails is an open source web application framework written in Ruby. It uses a model-view-controller pattern and convention over configuration approach to provide a full stack framework for developing database-backed web applications rapidly.
The document provides information about learning Ruby on Rails from Edureka including contact details. It outlines the objectives of understanding Rails framework features, MVC architecture and building applications. It also summarizes the history and advantages of Ruby as a programming language and how Rails applications use the MVC pattern and conventions over configuration approach.
This document provides an introduction and overview of Ruby on Rails, including who uses it, example applications built with it, its MVC framework structure, and a step-by-step guide to building a basic "Hello World" Ruby on Rails application.
Ruby is an object-oriented programming language created in 1993, while Rails is a web application framework built using Ruby. The document provides an overview of Ruby and Rails, including what Rails is and its key advantages such as convention over configuration, don't repeat yourself (DRY) principles, and object-relational mapping (ORM). It also demonstrates creating a sample Rails application and using the Spree e-commerce gem.
Talk I gave to Austin All Girl Hacknite. We installed rails and built the app step by step. We had alot of brand new to rails ladies and we had fun making this simple app
The document summarizes new features in Rails 3.1 beta, including asset handling changes where JavaScript and CSS files are now placed in app/assets, identity maps to improve performance of object loading, simpler database migrations that use a single change method, and improved test output formatting. It also discusses installing Rails 3.1 in a isolated gemset and using Sass and CoffeeScript as default asset compilers.
This document provides an overview of behavioural testing for Ruby on Rails applications at scale using RSpec and Cucumber. It discusses unit, integration and acceptance testing. It then covers the Test Driven Development (TDD) and Behaviour Driven Development (BDD) approaches. The rest of the document explains how to implement testing with RSpec, Shoulda-Matchers, Factory Girl, Cucumber, Gherkin and Capybara. It also discusses different web drivers that can be used like Rack Test, Selenium, Capybara-webkit and Poltergeist.
Rack is a Ruby web server interface that provides a minimal interface between web servers and Ruby frameworks like Rails. It allows web applications to be written as Ruby objects that respond to the call method. Rack applications take a request environment hash and return a status, headers, and response body array. Rack allows modularity through middlewares that act as filters on requests. Rails itself is built with Rack and exposes its middleware stack.
Docker containers have been making inroads into Windows and Azure world. Docker has now replaced the traditional Azure IaaS & PaaS services, offering superior container versions which are more responsive, cost effective, and agile. In this session for Charlotte Azure User Group, we will take an in-depth look at the intersection of Docker and Azure, and how Docker is empowering next gen Azure services.
Here's the link to CAG meetup for the event - https://www.meetup.com/Charlotte-Microsoft-Azure/events/fpftgmyxjbjb/
This document describes the challenges of manually configuring and deploying infrastructure for Ruby on Rails and Sinatra applications. It introduces infrastructure as code using Docker and Terraform to define and deploy two microservices—a Sinatra backend and Rails frontend—to Amazon ECS. Docker is used to package each application into images to ensure consistency across environments. Terraform will configure and deploy the necessary AWS resources. Using these tools reduces manual effort and errors compared to traditional deployment methods.
This document describes the challenges of manually configuring and deploying infrastructure for Ruby on Rails and Sinatra applications. It introduces infrastructure as code using Docker and Terraform to define and deploy two microservices—a Sinatra backend and Rails frontend—to Amazon ECS. Docker is used to package each application into images to ensure consistency across environments. Terraform will configure and deploy the necessary AWS resources. Using these tools reduces manual effort and errors compared to traditional deployment methods.
Introduction to Rails - presented by Arman Ortegaarman o
Â
This document provides an introduction to Ruby on Rails presented by Arman Ortega. It outlines what will be covered including an overview of Ruby and Rails, the concept of convention over configuration in Rails, and performing CRUD (create, read, update, delete) operations. It then demonstrates creating a sample blog application in Rails and provides links for additional learning resources.
A classic task for an Automation QA Engineer these days:
- Developer and automate test coverage for some web or mobile software solution
This workshop offers a quick start for anyone who is interested in building a proper end-to-end test framework for those needs from the scratch.
We will use a robust and effective stack of technologies, verified by time and trusted by the community:
RUBY + CUCUMBER + WATIR + WATIRSOME + RSPEC/EXPECTATIONS
This document provides an overview of Ruby on Rails, a web application framework written in Ruby. It discusses what Ruby and Rails are, the key strengths of Rails like productivity and convention over configuration. It then demonstrates how to build a basic Rails application, including generating models and controllers, scaffolding, and adding relationships between models. The document aims to introduce developers to Ruby on Rails and demonstrate its capabilities.
This presentation introduces Ruby on Rails by discussing what it is, what it means, who uses it, and how to get started with it. Ruby on Rails is an open source web application framework consisting of the Ruby programming language and the Rails framework. It uses conventions like MVC that allow for agile development. Popular companies that use Rails include Basecamp, Campfire, and Twitter. Contact information is provided for getting help learning Rails.
The document discusses RSpec, a behavior-driven development framework for Ruby. It provides two frameworks: a story framework for describing application-level behavior and a spec framework for describing object-level behavior. The document then discusses testing Rails applications, including testing models and controllers. It provides an example of generating a model, migration, and test for a Book model.
This document provides a help and tutorial for TopStyle Pro version 3.11. It covers getting started with TopStyle, editing style sheets and HTML/XHTML, working with colors, previews, validation, site management, reports, mappings, customization, and third-party integration. It also includes appendices on CSS basics and tips, TopStyle tips and tricks, style sheet resources, keyboard shortcuts, and regular expressions.
TopStyle Help & <b>Tutorial</b>tutorialsruby
Â
This document provides a table of contents for the TopStyle Pro Help & Tutorial, which teaches how to use the TopStyle software for editing style sheets and HTML/XHTML documents. It lists over 50 sections that provide explanations and instructions for features like creating and opening files, editing styles, working with colors, previews, validation, site management, reports and customizing the software. The document was created by Giampaolo Bellavite from the online help provided with TopStyle version 3.11.
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>tutorialsruby
Â
This document provides the course outline for IMD 210 Fundamentals of Scripting Languages at The Art Institute of Atlanta during the Spring 2005 quarter. The course focuses on integrating programming concepts with interface design using scripting languages like JavaScript and CSS. It will cover topics like DOM, CSS layout, JavaScript variables, conditionals, and events. Students will complete 4 assignments including redesigning existing websites, and there will be weekly quizzes, a midterm, and final exam. The course is worth 4 credits and meets once a week for class and lab.
This document provides the course outline for IMD 210 Fundamentals of Scripting Languages at The Art Institute of Atlanta during the Spring 2005 quarter. The course focuses on integrating programming concepts with interface design using scripting languages like JavaScript and CSS. It will cover topics like DOM, CSS layout, JavaScript variables, conditionals, and events. Students will complete 4 assignments including redesigning existing websites, and there will be weekly quizzes, a midterm, and final exam. The course is worth 4 credits and meets once a week for class and lab.
The group aims to bridge gaps between peer-to-peer database architectures and scaling multimedia information retrieval. They develop a probabilistic multimedia database system with abstraction layers for applications and researchers. They also research challenges of peer-to-peer networks for distributed data management. Both lines are supported by the MonetDB platform to exploit custom hardware and adaptive query optimization. The goal is a modular solution linking theoretical optimal solutions to application demands under resource limitations.
Standardization and Knowledge Transfer – INS0tutorialsruby
Â
The group aims to bridge gaps between peer-to-peer database architectures and scaling multimedia information retrieval. They develop a probabilistic multimedia database system with abstraction layers and a flexible model. They also research challenges of peer-to-peer networks for distributed data management. Both lines are supported by the MonetDB platform to exploit custom hardware and adaptive query optimization. The goal is a modular solution linking theoretical optimal solutions to application demands under resource limitations.
This document provides an introduction to converting HTML documents to XHTML, including the basic syntax changes needed like making all tags lowercase and closing all tags. It provides examples of correct XHTML markup for different tags. It also explains the new DOCTYPE declaration and shows a sample well-formed XHTML document incorporating all the discussed changes. Resources for learning more about XHTML are listed at the end.
This document provides an introduction to converting HTML documents to XHTML, including the basic syntax changes needed like making all tags lowercase and closing all tags. It provides examples of correct XHTML markup for different tags. It also explains the new DOCTYPE declaration and shows a sample well-formed XHTML document incorporating all the discussed changes. Resources for learning more about XHTML are listed at the end.
XHTML is a markup language that provides structure and semantics to web pages. It is based on XML and is more strict than HTML. XHTML pages must have a document type definition, html and head tags, and a body where the visible content goes. Common XHTML tags include paragraphs, lists, links, images, and divisions to logically separate content. While XHTML provides structure, CSS is used to style pages and control visual presentation by defining rules for tags. CSS rules are defined in external style sheets to keep presentation separate from structure and content.
XHTML is a markup language that provides structure and semantics to web pages. It is based on XML and is more strict than HTML. XHTML pages must have a document type definition, html and head tags, and a body where the visible content goes. Common XHTML tags include paragraphs, lists, links, images, and divisions to logically separate content. While XHTML provides structure, CSS is used to style pages and control visual presentation through rules that target specific XHTML elements.
This document discusses how to create and use external cascading style sheets (CSS) in Dreamweaver. It provides steps to:
1. Open the CSS Styles tab in Dreamweaver and create a new external CSS stylesheet using a sample text style.
2. Save the stylesheet and link it to a new HTML page to style elements like headings, text sizes, and boxes.
3. Edit existing styles by selecting a tag in the CSS Styles panel and modifying properties directly, or by clicking the tag and using the pencil icon to edit in a window. This allows customizing styles globally across all linked pages.
This document provides an overview of how to create and use cascading style sheets (CSS) in Dreamweaver. It describes the different types of style sheets, including external and internal style sheets. It outlines the steps to create an external style sheet in Dreamweaver using the CSS Styles panel and provides instructions for linking the external style sheet to an HTML page. The document demonstrates how to experiment with predefined styles and how to edit, add, and delete styles in the CSS stylesheet.
This document appears to be a weekly update from an intro to computer science course. It includes summaries of classmates' demographics, comfort levels, and prior experience. It also discusses time spent on problem sets and recommends upcoming courses in CS51 and CS61. Finally, it recommends reading on TCP/IP, HTTP, XHTML, CSS, PHP, SQL and using the bulletin board for questions.
This document appears to be a weekly update from an intro to computer science course. It includes summaries of classmates' demographics, comfort levels, and prior experience. It also discusses time spent on problem sets and recommends upcoming courses in CS51 and CS61. Finally, it recommends reading on topics like TCP/IP, HTTP, XHTML, CSS, PHP, SQL and using bulletin boards, and includes images related to these topics.
The document discusses how to use Cascading Style Sheets (CSS) with Corvid Servlet Runtime templates to control formatting and layout. CSS allows separating design from content, making templates simpler and easier to maintain. It also enables adapting appearance for different devices. The document provides examples of using CSS classes to style template elements and explains how to set up a demo system using the included CSS and templates.
The document discusses how to use Cascading Style Sheets (CSS) with Corvid Servlet Runtime templates to control formatting and layout. CSS allows separating design from content, making templates simpler and easier to maintain. It also enables customization of appearance for different devices. The document provides examples of how to apply CSS classes and rules to Corvid template elements to control fonts, colors, positioning and more.
The document provides an introduction to CSS and how it works with HTML to control the presentation and styling of web page content. It explains basic CSS concepts like selectors, properties and values, and how CSS rules are used to target specific HTML elements and style them. Examples are given of common CSS properties and selectors and how they can be used to style elements and format the layout of web pages.
The document introduces CSS and how it works with HTML to separate content from presentation, allowing the styling of web pages through rules that target HTML elements. It explains CSS syntax and various selectors like type, class, ID, and descendant selectors. Examples are provided of how CSS can be used to style properties like color, font, padding, and layout of elements on a page.
Cascading Style Sheets (CSS) allow users to define how HTML elements are presented on a page. CSS enables changing the appearance and layout of an entire website by editing just one CSS file. CSS uses selectors to apply styles to HTML elements via properties and values. Styles can be defined internally in HTML or externally in CSS files. CSS can control text formatting, colors, spacing, positioning and more to achieve visual consistency across web pages.
Cascading Style Sheets (CSS) allow users to define how HTML elements are presented on a page. CSS enables changing the appearance and layout of an entire website by editing just one CSS file. CSS uses selectors to apply styles to HTML elements via properties and values. Styles can be defined internally in HTML or externally in CSS files. CSS can control text formatting, colors, spacing, positioning and more to achieve visual consistency across web pages.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Â
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Â
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Main news related to the CCS TSI 2023 (2023/1695)Jakub Marek
Â
An English 🇬🇧 translation of a presentation to the speech I gave about the main changes brought by CCS TSI 2023 at the biggest Czech conference on Communications and signalling systems on Railways, which was held in Clarion Hotel Olomouc from 7th to 9th November 2023 (konferenceszt.cz). Attended by around 500 participants and 200 on-line followers.
The original Czech 🇨🇿 version of the presentation can be found here: https://www.slideshare.net/slideshow/hlavni-novinky-souvisejici-s-ccs-tsi-2023-2023-1695/269688092 .
The videorecording (in Czech) from the presentation is available here: https://youtu.be/WzjJWm4IyPk?si=SImb06tuXGb30BEH .
Introduction of Cybersecurity with OSS at Code Europe 2024Hiroshi SHIBATA
Â
I develop the Ruby programming language, RubyGems, and Bundler, which are package managers for Ruby. Today, I will introduce how to enhance the security of your application using open-source software (OSS) examples from Ruby and RubyGems.
The first topic is CVE (Common Vulnerabilities and Exposures). I have published CVEs many times. But what exactly is a CVE? I'll provide a basic understanding of CVEs and explain how to detect and handle vulnerabilities in OSS.
Next, let's discuss package managers. Package managers play a critical role in the OSS ecosystem. I'll explain how to manage library dependencies in your application.
I'll share insights into how the Ruby and RubyGems core team works to keep our ecosystem safe. By the end of this talk, you'll have a better understanding of how to safeguard your code.
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
Â
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Â
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
Project Management Semester Long Project - Acuityjpupo2018
Â
Acuity is an innovative learning app designed to transform the way you engage with knowledge. Powered by AI technology, Acuity takes complex topics and distills them into concise, interactive summaries that are easy to read & understand. Whether you're exploring the depths of quantum mechanics or seeking insight into historical events, Acuity provides the key information you need without the burden of lengthy texts.
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Â
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
Â
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Digital Marketing Trends in 2024 | Guide for Staying AheadWask
Â
https://www.wask.co/ebooks/digital-marketing-trends-in-2024
Feeling lost in the digital marketing whirlwind of 2024? Technology is changing, consumer habits are evolving, and staying ahead of the curve feels like a never-ending pursuit. This e-book is your compass. Dive into actionable insights to handle the complexities of modern marketing. From hyper-personalization to the power of user-generated content, learn how to build long-term relationships with your audience and unlock the secrets to success in the ever-shifting digital landscape.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Â
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
2. Table of Contents
Distributing Rails Applications............................................................................................................1
A Tutorial ...................................................................................................................................1
.
1. Introduction........................................................................................................................................2
2. Ingredients..........................................................................................................................................3
2.1. Ruby.....................................................................................................................................3
2.2. Rails.....................................................................................................................................3
2.3. SQLite..................................................................................................................................3
2.4. Ruby-SQLite Bindings........................................................................................................3
2.5. Tar2RubyScript ...................................................................................................................3
.
2.6. RubyScript2Exe...................................................................................................................3
3. The Steps.............................................................................................................................................5
3.1. Setup the Environment........................................................................................................5
.
3.2. Create the SQLite Database.................................................................................................5
3.3. Develop the Rails Application.............................................................................................5
3.4. Create the RBA from the Application with Tar2RubyScript..............................................6
3.5. Create the standalone Executable with RubyScript2Exe .....................................................8
4. Conclusion..........................................................................................................................................9
Distributing Rails Applications - A Tutorial i
3. Distributing Rails Applications
A Tutorial
Sun Dec 24 19:01:32 UTC 2006
Erik Veenstra <erikveen@dds.nl>
Distributing Rails Applications - A Tutorial 1
4. 1. Introduction
(Before we start: On real production servers, don't "deploy" a Rails application like this. That's not a good idea. But if you only want to ship
your demo, well, read on...)
I get a lot of emails about packing and distributing Rails applications with Tar2RubyScript and
RubyScript2Exe. It obviously wasn't easy to come up with the steps that have to be taken to transform
a Rails application into a standalone application. Since I never built a Rails application myself, I
wasn't even sure if it was possible at all. That's why I decided to write this tutorial.
In this tutorial, we'll go through the following steps:
1. Setup the environment
2. Create the SQLite database
3. Develop the Rails application
4. Create the RBA (= Ruby archive) from the application with Tar2RubyScript
5. Create the standalone executable with RubyScript2Exe
Before we begin, I assume that you've installed the following components (The version numbers are
the versions I've installed myself.):
• Ruby (1.8.2)
• Rails (0.14.3)
• SQLite (2.8.15)
• Ruby-SQLite bindings (2.2.3)
Since a lot of information about the installation of each individual component can be found on the
'Net, I skip the do-this-to-install-that part. Well, we have to start somewhere...
For this tutorial, I used the RubyInstaller version of Ruby on Windows 2000 and installed both Rails
and SQLite-Ruby with RubyGems. But you could use Linux as well. Every single step is the same on
both platforms. The differences are just textual: back slashes instead of forward slashes, c:> instead
of # and copy instead of cp. That's it.
More general information about distributing Ruby applications (especially Tar2RubyScript,
RubyScript and how they work together) can be found here.
Distributing Rails Applications - A Tutorial 2
5. 2. Ingredients
2.1. Ruby
Ruby is "the interpreted scripting language for quick and easy object-oriented programming. It has
many features to process text files and to do system management tasks (as in Perl). It is simple,
straight-forward, extensible, and portable".
See the Ruby site for more information about Ruby.
2.2. Rails
Rails is "a full-stack, open-source web framework in Ruby for writing real-world applications with
joy and less code than most frameworks spend doing XML sit-ups".
See the Rails site for more information about Rails.
2.3. SQLite
SQLite is "a self-contained, embeddable, zero-configuration SQL database engine".
See the SQLite site for more information about SQLite.
2.4. Ruby-SQLite Bindings
Ruby-SQLite "allows Ruby programs to interface with the SQLite database engine".
See the SQLite-Ruby site for more information about SQLite-Ruby.
2.5. Tar2RubyScript
Tar2RubyScript "transforms a directory tree, containing your application, into one single Ruby
script, along with some code to handle this archive. This script can be distributed to our friends.
When they've installed Ruby, they just have to double click on it and your application is up and
running!"
See the Tar2RubyScript site for more information about Tar2RubyScript.
This is all you need: tar2rubyscript.rb. A "gem install tar2rubyscript" will do,
too.
2.6. RubyScript2Exe
RubyScript2Exe "transforms your Ruby script into a standalone, compressed Windows, Linux or Mac
OS X (Darwin) executable. You can look at it as a "compiler". Not in the sense of a
Distributing Rails Applications - A Tutorial 3
6. 2. Ingredients
source-code-to-byte-code compiler, but as a "collector", for it collects all necessary files to run your
script on an other machine: the Ruby script, the Ruby interpreter and the Ruby runtime library
(stripped down for this script). Anyway, the result is the same: a standalone executable
(application.exe). And that's what we want!"
See the RubyScript2Exe site for more information about RubyScript2Exe.
This is all you need: rubyscript2exe.rb. A "gem install rubyscript2exe" will do,
too.
Distributing Rails Applications - A Tutorial 4
7. 3. The Steps
3.1. Setup the Environment
First of all, create a simple Rails application and test it:
C:rails> rails demo
C:rails> cd demo
C:railsdemo> ruby scriptserver
Point your browser to http://localhost:3000/.
3.2. Create the SQLite Database
Now let's create a test database:
With Ruby:
C:railsdemo> ruby
require "rubygems"
require_gem "sqlite-ruby"
SQLite::Database.new("demo_dev.db").execute(
"create table books (id integer primary key,
title varchar(255),
author varchar(255));")
^D # That's ctrl-D...
Or with SQLite:
C:railsdemo> sqlite demo_dev.db
SQLite version 2.8.15
Enter ".help" for instructions
sqlite> create table books
...> (id integer primary key,
...> title varchar(255),
...> author varchar(255)
...> );
sqlite> .quit
And copy this empty database to a test database and a production database, for later usage:
C:railsdemo> copy demo_dev.db demo_tst.db
C:railsdemo> copy demo_dev.db demo_prd.db
3.3. Develop the Rails Application
Configure the application to use SQLite:
C:railsdemo> notepad configdatabase.yml
Replace the contents of this file with something like this:
Distributing Rails Applications - A Tutorial 5
8. 3. The Steps
development:
adapter: sqlite
database: demo_dev.db
test:
adapter: sqlite
database: demo_tst.db
production:
adapter: sqlite
database: demo_prd.db
Create the model and the controller:
C:railsdemo> ruby scriptgenerate model Book
C:railsdemo> ruby scriptgenerate controller Book
C:railsdemo> notepad appcontrollersbook_controller.rb
Edit this file, so it looks like this:
class BookController < ApplicationController
scaffold :book
end
Test it:
C:railsdemo> ruby scriptserver
Point your browser to http://localhost:3000/book/list and add some new books.
3.4. Create the RBA from the Application with
Tar2RubyScript
Now comes the trickiest part...
Tar2RubyScript transforms your application (the complete directory tree: program, configuration and
user data) into a single Ruby script, called RBA (= Ruby archive). When running this RBA, it
unpacks itself to a temporary directory before starting the embedded application. On termination, this
directory is deleted, along with our user data... That's not what we want! So we have to move the user
data to a safe place before running our application as an RBA.
(In the ideal world, we should "externalize" the logs and some config files as well.)
This means that we have to adjust our code:
C:railsdemo> notepad configenvironment.rb
Add this at the top of the file:
module Rails
class Configuration
def database_configuration
conf = YAML::load(ERB.new(IO.read(database_configuration_file)).result)
Distributing Rails Applications - A Tutorial 6
9. 3. The Steps
if defined?(TAR2RUBYSCRIPT)
conf.each do |k, v|
if v["adapter"] =~ /^sqlite/
v["database"] = oldlocation(v["database"]) if v.include?("database")
v["dbfile"] = oldlocation(v["dbfile"]) if v.include?("dbfile")
end
end
end
conf
end
end
end
This overwrites Rails::Configuration#database_configuration, which was
originally defined as:
module Rails
class Configuration
def database_configuration
YAML::load(ERB.new(IO.read(database_configuration_file)).result)
end
end
end
What happens? When running an RBA, the programmer has to deal with two kind of locations: the
location in which the user started the application (accessible with oldlocation()) and the
temporary directory with the application itself, created by the RBA (accessible with
newlocation()). By using oldlocation() in the code above, we simply adjust the data from
config/database.yml.
Without the adjustment, conf would look like this:
{"development"=>{"database"=>"demo_dev.db", "adapter"=>"sqlite"}
"production"=>{"database"=>"demo_prd.db", "adapter"=>"sqlite"}
"test"=>{"database"=>"demo_tst.db", "adapter"=>"sqlite"}}
With the adjustment, conf would look like this:
{"development"=>{"database"=>"/full/path/to/demo_dev.db", "adapter"=>"sqlite"}
"production"=>{"database"=>"/full/path/to/demo_prd.db", "adapter"=>"sqlite"}
"test"=>{"database"=>"/full/path/to/demo_tst.db", "adapter"=>"sqlite"}}
Tar2RubyScript also needs init.rb, which is the entry point. So we create it:
C:railsdemo> notepad init.rb
It looks like this:
at_exit do
require "irb"
require "drb/acl"
require "sqlite"
end
load "script/server"
Distributing Rails Applications - A Tutorial 7
10. 3. The Steps
The require's are a little trick. If you start and stop a Rails application, without any interaction with
a browser, not all require's of the program are encountered, so RubyScript2Exe might miss some
libraries. Requiring them at the end avoids this problem. It's just bad behavior (in casu of Rails...) to
require some libraries halfway a program...
Now it's time to pack the application into an RBA:
C:railsdemo> cd ..
C:rails> ruby tar2rubyscript.rb demo
Tar2RubyScript creates demo.rb, which is the RBA. This RBA contains both the application and
the databases. But we're not going to use this embedded user data (do you remember
oldlocation?), so we copy the DB's to the current directory:
C:rails> copy demo*.db
Now we can test our RBA:
C:rails> ruby demo.rb [-e environment]
Once again: the DB's we use when running as RBA are not the same as the DB's we use when running
the application the old way! The sets are simply in another directory.
3.5. Create the standalone Executable with
RubyScript2Exe
Creating a standalone executable is as simple as this:
C:rails> ruby rubyscript2exe.rb demo.rb
^C (When Rails is started...) # That's ctrl-C...
RubyScript2Exe creates demo.exe (or demo_linux or demo_darwin, depending on your
platform).
Now we copy demo.exe and demo_*.db to our USB memory stick, drive to our customer (he
hasn't Ruby...) and simply start the application:
C:rails> demo.exe [-e environment]
Distributing Rails Applications - A Tutorial 8
11. 4. Conclusion
No installation of Ruby, no installation of RubyGems, no installation of the various gems, no
installation of SQLite; There's only one executable!
Another conclusion concerns Rails. Rails has two architectural shortcomings (related to distributing
the application):
• The user data isn't separated from the application itself.
• require is used halfway the program. This is not RubyScript2Exe-friendly.
As we've seen, both shortcomings can be worked around.
aior all allinone allinoneruby applications archive bin browser code codesnippet codesnippets compile compiler computer
computerlanguage dialog dialogs distribute distributing distributingrubyapplications distribution eee eee-file eeefile erik erikveen
erikveenstra exe executable exerb file graphical graphicaluserinterface gui gz html http httpserver iloveruby interface jar jit just justintime
lang language one pack package packaging packing packingrubyapplications programming programminglanguage rar rb rb2bin rb2exe rba
rbarchive rbtobin rbtoexe rbw ruby ruby2bin ruby2exe rubyapplications rubyarchive rubycompiler rubyscript rubyscript2 rubyscript2exe
rubyscripts rubyscripttoexe rubytobin rubytoexe rubyweb rubywebdialog rubywebdialogs script scripts server snippet snippets t2rb t2rs tar
tar2rb tar2rbscript tar2rs tar2rscript time ui user userinterface veenstra web webbrowser webdialog webdialogs window windowinbrowser
windows wrap wrapper wxruby zip
Distributing Rails Applications - A Tutorial 9